我已经创建了一个按钮编程,我想引发事件去下一页,事件不会生成。我能做什么?如何在按钮上生成事件以通过按钮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
我没有正确地解决你的问题? –