Je ne ai jamais utilisé PageControl, mais en principe, votre code ressemblerait à ceci:
dans YourAppDelegate de
@interface YourAppDelegate : NSObject <UIApplicationDelegate> {
...
UIPageControl *pageControl;
...
}
@property (nonatomic, retain) IBOutlet ScrollingViewController *viewController;
de YourAppDelegate.m:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
pageControl = [[UIPageControl alloc] init]; // or whatever is needed to set up pagecontrol
}
dans l'une de vos vues:
YourAppDelegate *appDelegate = (YourAppDelegate *)[[UIApplication sharedApplication] delegate];
//and then access the variable by appDelegate.variable