Created
September 4, 2012 04:18
-
-
Save ChrisRisner/3616516 to your computer and use it in GitHub Desktop.
Intro to ObjectiveC
This file contains hidden or 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
//Using Pointers | |
NSDictionary *myDictionary = ... | |
//Not using Pointers | |
NSDictionary myDictionary = ... |
This file contains hidden or 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
@interface ExampleObject : NSObject { | |
@private | |
BOOL _boolType; | |
NSDictionary *_dictionary; | |
} | |
//Properties | |
@property (nonatomic, weak) NSString *stringProperty; | |
//Methods | |
- (void)methodToCall:(id)sender; | |
@end |
This file contains hidden or 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
@implementation ExampleObject | |
@synthesize stringProperty; | |
- (void)methodToCall:(id)sender{ | |
//method body | |
} | |
@end |
This file contains hidden or 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
for (NSString *string in array) { | |
//Do Something | |
} | |
for (int i = 0; i < number; i++) { | |
//Do something | |
} | |
while (boolean == true) { | |
//Do something | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment