我已經創建了一個按鈕編程,我想引發事件去下一頁,事件不會生成。我能做什麼?如何在按鈕上生成事件以通過按鈕iphone
這是代碼:
btnSignUp =[UIButton buttonWithType:UIButtonTypeRoundedRect];
btnSignUp.frame =CGRectMake(20,250,280,35);
[btnSignUp setTitle:@"Sign Up" forState:UIControlStateNormal];
[btnSignUp addTarget:self action:@selector(registrationPage:)
forControlEvents:UIControlEventAllTouchEvents];
-(void)registrationPage:(id)sender
{
registration =[[RegistrationPage alloc] initWithNibName:@"Registration" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:registration animated:YES];
}
看看我code__肯定工作 RegistrationPage * R = [[RegistrationPage頁頭] initWithNibName:@ 「RegistrationPage」 捆綁:無]。 [self.navigationController pushViewController:r animated:YES]; //錯誤[r release]; 當我嘗試釋放r的resorce時,它給了我錯誤!你可以給soltuion嗎? – Chintan
我沒有正確地解決你的問題? –