pageCtrl = [[UIPageControl alloc] initWithFrame : CGRectMake(20,100,280,50)];
[pageCtrl addTarget : self
action : @selector(pageChanged:)
forControlEvents : UIControlEventTouchUpInside];
pageCtrl.numberOfpages = 15;
[theView addSubView : pageCtrl];
- (void)pageChanged : (id)sender{
if(pageCtrl == sender){
printf(“The page was changed to %d\n”, [pageCtrl currentPage]);
}
}
#import @interface CDAViewController : UIViewController {NSString *strPortraitNormal, *strPortraitUpSideDown, *strLandscape; -(NSString*)message;}@end
pageCtrl = [[UIPageControl alloc] initWithFrame : CGRectMake(20,100,280,50)];
[pageCtrl addTarget : self
action : @selector(pageChanged:)
forControlEvents : UIControlEventTouchUpInside];
pageCtrl.numberOfpages = 15;
[theView addSubView : pageCtrl];
- (void)pageChanged : (id)sender{
if(pageCtrl == sender){
printf(“The page was changed to %d\n”, [pageCtrl currentPage]);
}
}
pageCtrl = [[UIPageControl alloc] initWithFrame : CGRectMake(20,100,280,50)];
[pageCtrl addTarget : self
action : @selector(pageChanged:)
forControlEvents : UIControlEventTouchUpInside];
pageCtrl.numberOfpages = 15;
[theView addSubView : pageCtrl];
- (void)pageChanged : (id)sender{
if(pageCtrl == sender){
printf(“The page was changed to %d\n”, [pageCtrl currentPage]);
}
}