Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 08-21-2008, 07:15 AM   #16 (permalink)
cDima
New Member
 
Join Date: Aug 2008
Posts: 6
Default

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.
cDima is offline   Reply With Quote
 

» Advertisements
» Online Users: 272
19 members and 253 guests
ADY, apatsufas, BdR, Diegan, djohnson, Duncan C, F_Bryant, glenn_sayers, Guthook, ilmman, joeallenpro, ketaskin, Music Man, NSeven, rodgo, VikMyr, vogueestylee, zbynda, ziocleto
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,876
Threads: 89,225
Posts: 380,708
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jorge599
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:05 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.