Skip to content

Instantly share code, notes, and snippets.

@ChrisRisner
Created September 4, 2012 04:18
Show Gist options
  • Save ChrisRisner/3616516 to your computer and use it in GitHub Desktop.
Save ChrisRisner/3616516 to your computer and use it in GitHub Desktop.
Intro to ObjectiveC
//Using Pointers
NSDictionary *myDictionary = ...
//Not using Pointers
NSDictionary myDictionary = ...
@interface ExampleObject : NSObject {
@private
BOOL _boolType;
NSDictionary *_dictionary;
}
//Properties
@property (nonatomic, weak) NSString *stringProperty;
//Methods
- (void)methodToCall:(id)sender;
@end
@implementation ExampleObject
@synthesize stringProperty;
- (void)methodToCall:(id)sender{
//method body
}
@end
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