forked from defagos/CoconutKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update snippets. Add snippets for ARC projects
- Loading branch information
Showing
22 changed files
with
433 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#pragma mark Object creation and destruction | ||
|
||
- (void)dealloc | ||
{ | ||
// Code | ||
} | ||
|
||
#pragma mark Accessors and mutators | ||
|
||
#pragma mark Test setup and tear down | ||
|
||
- (void)setUp | ||
{ | ||
[super setUp]; | ||
|
||
// Code to be run before each test | ||
} | ||
|
||
- (void)tearDown | ||
{ | ||
[super tearDown]; | ||
|
||
// Code to be run after each test | ||
} | ||
|
||
- (void)setUpClass | ||
{ | ||
[super setUpClass]; | ||
|
||
// Code to be run before the first test | ||
} | ||
|
||
- (void)tearDownClass | ||
{ | ||
[super tearDownClass]; | ||
|
||
// Code to be run after the last test | ||
} | ||
|
||
#pragma mark Tests | ||
|
||
// Insert methods beginnning with test... here. Log with GHTestLog |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma mark Object creation and destruction | ||
|
||
- (id)initWithFrame:(CGRect)frame | ||
{ | ||
if ((self = [super initWithFrame:frame])) { | ||
// Code | ||
} | ||
return nil; | ||
} | ||
|
||
- (id)initWithCoder:(NSCoder *)aDecoder | ||
{ | ||
if ((self = [super initWithCoder:aDecoder])) { | ||
// Code | ||
} | ||
return self; | ||
} | ||
|
||
- (void)dealloc | ||
{ | ||
// Code | ||
} | ||
|
||
#pragma mark Accessors and mutators | ||
|
||
#pragma mark View customisation | ||
|
||
- (void)awakeFromNib | ||
{ | ||
[super awakeFromNib]; | ||
|
||
// Code | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma mark Object creation and destruction | ||
|
||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier | ||
{ | ||
if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) { | ||
// Code | ||
} | ||
return self; | ||
} | ||
|
||
- (void)dealloc | ||
{ | ||
// Code | ||
} | ||
|
||
#pragma mark Accessors and mutators | ||
|
||
#pragma mark Cell customisation | ||
|
||
- (void)awakeFromNib | ||
{ | ||
[super awakeFromNib]; | ||
|
||
// Code | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
#pragma mark Object creation and destruction | ||
|
||
- (id)init | ||
{ | ||
if ((self = [super init])) { | ||
// Code | ||
} | ||
return self; | ||
} | ||
|
||
- (id)initWithCoder:(NSCoder *)aDecoder | ||
{ | ||
if ((self = [super initWithCoder:aDecoder])) { | ||
// Code | ||
} | ||
return self; | ||
} | ||
|
||
- (void)dealloc | ||
{ | ||
// Code | ||
} | ||
|
||
- (void)releaseViews | ||
{ | ||
[super releaseViews]; | ||
|
||
// Code | ||
} | ||
|
||
#pragma mark Accessors and mutators | ||
|
||
#pragma mark View lifecycle | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
|
||
// Code | ||
} | ||
|
||
- (void)viewWillAppear:(BOOL)animated | ||
{ | ||
[super viewWillAppear:animated]; | ||
|
||
// Code | ||
} | ||
|
||
- (void)viewDidAppear:(BOOL)animated | ||
{ | ||
[super viewDidAppear:animated]; | ||
|
||
// Code | ||
} | ||
|
||
- (void)viewWillDisappear:(BOOL)animated | ||
{ | ||
[super viewWillDisappear:animated]; | ||
|
||
// Code | ||
} | ||
|
||
- (void)viewDidDisappear:(BOOL)animated | ||
{ | ||
[super viewDidDisappear:animated]; | ||
|
||
// Code | ||
} | ||
|
||
#pragma mark Orientation management | ||
|
||
- (NSUInteger)supportedInterfaceOrientations | ||
{ | ||
// Code, most probably one of: | ||
// return [super supportedInterfaceOrientations] & UIInterfaceOrientationMaskAll; | ||
// return [super supportedInterfaceOrientations] & UIInterfaceOrientationMaskPortrait; | ||
// return [super supportedInterfaceOrientations] & UIInterfaceOrientationMaskLandscape; | ||
// return [super supportedInterfaceOrientations] & UIInterfaceOrientationMaskAllButUpsideDown; | ||
} | ||
|
||
#pragma mark Memory warnings | ||
|
||
- (void)didReceiveMemoryWarning | ||
{ | ||
[super didReceiveMemoryWarning]; | ||
|
||
// Code | ||
} | ||
|
||
#pragma mark Localization | ||
|
||
- (void)localize | ||
{ | ||
[super localize]; | ||
|
||
// Code | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#pragma mark Class methods | ||
|
||
+ (void)initialize | ||
{ | ||
if (self != [ClassName class]) { | ||
return; | ||
} | ||
|
||
// Code | ||
} | ||
|
||
#pragma mark Object creation and destruction | ||
|
||
- (id)init | ||
{ | ||
if ((self = [super init])) { | ||
// Code | ||
} | ||
return self; | ||
} | ||
|
||
- (void)dealloc | ||
{ | ||
// Code | ||
} | ||
|
||
#pragma mark Accessors and mutators | ||
|
||
#pragma mark Description | ||
|
||
- (NSString *)description | ||
{ | ||
return [NSString stringWithFormat:@"<%@: %p; field1: %@; field2: %@>", | ||
[self class], | ||
self, | ||
field1, | ||
field2]; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
63 changes: 63 additions & 0 deletions
63
Tools/Snippets/non-ARC/HLSCursorDataSource_HLSCursorDelegate.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#pragma mark HLSCursorDataSource protocol implementation | ||
|
||
- (NSUInteger)numberOfElementsForCursor:(HLSCursor *)cursor | ||
{ | ||
|
||
} | ||
|
||
- (UIView *)cursor:(HLSCursor *)cursor viewAtIndex:(NSUInteger)index selected:(BOOL)selected | ||
{ | ||
|
||
} | ||
|
||
- (NSString *)cursor:(HLSCursor *)cursor titleAtIndex:(NSUInteger)index | ||
{ | ||
|
||
} | ||
|
||
- (UIFont *)cursor:(HLSCursor *)cursor fontAtIndex:(NSUInteger)index selected:(BOOL)selected | ||
{ | ||
|
||
} | ||
|
||
- (UIColor *)cursor:(HLSCursor *)cursor textColorAtIndex:(NSUInteger)index selected:(BOOL)selected | ||
{ | ||
|
||
} | ||
|
||
- (UIColor *)cursor:(HLSCursor *)cursor shadowColorAtIndex:(NSUInteger)index selected:(BOOL)selected | ||
{ | ||
|
||
} | ||
|
||
- (CGSize)cursor:(HLSCursor *)cursor shadowOffsetAtIndex:(NSUInteger)index selected:(BOOL)selected | ||
{ | ||
|
||
} | ||
|
||
#pragma mark HLSCursorDelegate protocol implementation | ||
|
||
- (void)cursor:(HLSCursor *)cursor didMoveFromIndex:(NSUInteger)index | ||
{ | ||
|
||
} | ||
|
||
- (void)cursor:(HLSCursor *)cursor didMoveToIndex:(NSUInteger)index | ||
{ | ||
|
||
} | ||
|
||
- (void)cursorDidStartDragging:(HLSCursor *)cursor | ||
{ | ||
|
||
} | ||
|
||
- (void)cursor:(HLSCursor *)cursor didDragNearIndex:(NSUInteger)index | ||
{ | ||
|
||
} | ||
|
||
- (void)cursorDidStopDragging:(HLSCursor *)cursor | ||
{ | ||
|
||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma mark Non-trivial default values for new records | ||
|
||
- (void)awakeFromInsert | ||
{ | ||
[super awakeFromInsert]; | ||
|
||
// Code | ||
} | ||
|
||
#pragma mark Accessors and mutators | ||
|
||
#pragma mark Description | ||
|
||
- (NSString *)description | ||
{ | ||
return [NSString stringWithFormat:@"<%@: %p; field1: %@; field2: %@>", | ||
[self class], | ||
self, | ||
field1, | ||
field2]; | ||
} |
File renamed without changes.
Oops, something went wrong.