UIPageControl
初めてを使用しようとしていますが、 で関数を呼び出すことができないようですUIControlEventValueChanged
。ここで何か不足していますか?ストーリーボードの実装も試しましたが、同じ壊れた結果です。UIControlEventTouchUpInside
などのアクションも試してみました。changePage:
以下の関数を呼び出すものはありません。
.h で:
@property (nonatomic, retain) UIPageControl *introPageControl;
-(IBAction)changePage:(id)sender;
.m で:
@synthesize introPageControl;
- (void)viewDidLoad {
[super viewDidLoad];
self.introPageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0,208,self.view.frame.size.width,36)];
self.introPageControl.numberOfPages = 4;
self.introPageControl.currentPage = 0;
[self.introPageControl addTarget:self action:@selector(changePage:) forControlEvents:UIControlEventValueChanged];
[self.view addSubview:self.introPageControl];
}
-(IBAction)changePage:(id)sender {
// NEVER GETS CALLED :(
}