Skip to content

Instantly share code, notes, and snippets.

@dbrajkovic
dbrajkovic / VITextView.h
Created November 13, 2012 17:45
VITextView
//
// VITextView.h
//
// Created by Dan Brajkovic on 11/13/12.
// Copyright (c) 2012 VOKAL Interactive. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface VITextView : UITextView
@dbrajkovic
dbrajkovic / NSMutableArray+Shuffle.h
Created October 10, 2012 16:21
NSMutableArray (Shuffle)
@interface NSMutableArray (Shuffle)
- (void)shuffle;
@end
@dbrajkovic
dbrajkovic / AsyncSenTestingKitTests.h
Created August 4, 2012 21:17 — forked from akisute/AsyncSenTestingKitTests.h
SenAsyncTestCase - Asynchronous capable SenTestCase
//
// AsyncSenTestingKitTests.h
// AsyncSenTestingKitTests
//
// Created by 小野 将司 on 12/03/17.
// Copyright (c) 2012年 AppBankGames Inc. All rights reserved.
//
#import <SenTestingKit/SenTestingKit.h>
#import "SenAsyncTestCase.h"
@dbrajkovic
dbrajkovic / UIView+TagExtensions.h
Created April 11, 2012 21:07
UIView Tag Categories
//
// UIView+TagExtensions.h
//
// Created by Daniel Brajkovic on 2/19/12.
#import <UIKit/UIKit.h>
@interface UIView (TagExtensions)
- (UIButton *)buttonWithTag:(NSInteger)aTag;
@dbrajkovic
dbrajkovic / gist:1934933
Created February 28, 2012 20:35
NSDictionary Hash
2012-02-28 15:09:52.944 Untitled[27437:707] {
"#business_information" = {
"-moz-text-shadow" = "1px 1px 1px #333333";
"-ms-text-shadow" = "1px 1px 1px #333333";
"-o-text-shadow" = "1px 1px 1px #333333";
"-webkit-text-shadow" = "1px 1px 1px #333333";
"background-color" = red;
"background-image" = "none !important";
"border-top" = "1px solid #fe8184";
color = "#fff !important";
@dbrajkovic
dbrajkovic / UIColor-Hex.h
Created January 24, 2012 22:42
UIColor category which returns a UIColor with a given Hex Code and alpha value
@interface UIColor (Hex)
+ (UIColor *)colorWithHex:(NSString *)hex alpha:(CGFloat)alpha;
- (UIColor *)initWithHex:(NSString *)hex alpha:(CGFloat)alpha;
@end
@dbrajkovic
dbrajkovic / gist:1581185
Created January 9, 2012 04:47
Singlton
+ (id)allocWithZone:(NSZone *)zone {
return [[self sharedManager] retain];
}
- (id)copyWithZone:(NSZone *)zone {
return self;
}
- (id)retain {
return self;
}
- (unsigned)retainCount {
@dbrajkovic
dbrajkovic / location.js
Created August 26, 2011 19:05
HTML5 Geolocation script example
var map;
var geocoder;
function addAddressToMap(response)
{
map.clearOverlays();
if (!response || response.Status.code != 200)
{
alert("Sorry, we were unable to geocode that address");
}
@dbrajkovic
dbrajkovic / locator.js
Created August 26, 2011 19:04
browser geolocation example script
var map;
var geocoder;
function addAddressToMap(response)
{
map.clearOverlays();
if (!response || response.Status.code != 200)
{
alert("Sorry, we were unable to geocode that address");
}
@dbrajkovic
dbrajkovic / ManageWatchListsController.j
Created April 17, 2011 21:12
Example of Editable CPTableView
@implementation ManageWatchListsController : CPObject
{
@outlet CPTableView watchListTableView;
@outlet CPButtonBar buttonBar;
CPArray watchLists;
var selectedWatchList;
}
-(void)init
{