So.... for the sake of patterns, show me how to do this app correctly with MVC.
This code scared me away:
Code:
TwoViewAppAppDelegate *mainDelegate = (TwoViewAppAppDelegate *)[[UIApplication sharedApplication] delegate];
Lets do this via ViewControllers.
The MainView should have the controller TwoViewAppViewController.
The TwoViewAppViewController should have 2 methods: sayHi, flipView?
Code:
#import
@interface TwoViewAppViewController : UIViewController {
IBOutlet UILabel *theLabel;
}
@property (nonatomic, retain) UILabel *theLabel;
-(void) sayHi: (id) sender;
-(void) flipView: (id) sender;
@end
Inside flipView:sender we call the delegate, which is TwoViewAppAppDelegate? How do we reach the TwoViewAppAppDelegate?
I'm confused.