Last active
December 12, 2015 02:18
-
-
Save beelsebob/4698128 to your computer and use it in GitHub Desktop.
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 JAHFirstViewController : UIViewController // Note, JAH class prefix, you should prefix all of your classes | |
| @property (nonatomic, strong) NSMutableArray *json; /* this property is named poorly – it's not json, it's an array */ | |
| @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
| // @synthesize json; <- this is completely unnecessary | |
| - (void)doSomething | |
| { | |
| SecondViewController *secondViewController = [[SecondViewController alloc] init]; | |
| [secondViewController setSecondJSON:[self json]]; | |
| [[self navigationController] pushViewController:secondViewController animated:YES]; | |
| } |
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 JAHSecondViewController : UIViewController // Again, prefix your classes | |
| @property (nonatomic, strong) NSMutableArray *secondJSON; // Again, this is named poorly, fix it! | |
| @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
| - (void)viewDidLoad | |
| { | |
| [super viewDidLoad]; | |
| NSLog(@"%@", [self secondJSON]); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment