按钮操作无效 视图1中的
:
-
(void)PreseentTheNextView
{
NSLog(@"clicked to add the new view from botom to top");
PreferenceViewController *prefDetails=[[PreferenceViewController alloc] initWithNibName:@"PreferenceViewController" bundle:nil];
[self presentModalViewController:prefDetails animated:YES];
}
我在 PreferenceViewController
上有两个按钮在视图2中
-(IBAction)button1Click
{
NSLog(@"Button 1 Clicked");
}
-(IBAction)button2Click
{
NSLog(@"Button 2 Clicked");
}
-(IBAction)DismissButton
{
NSLog(@"Remove/ Dismiss down the view to previus page ");
}
所有这些按钮都在PreferenceViewController的IB中设置。
当我使用 presentModalViewController
时,这些按钮操作无效如果我使用导航PushViewController ,那么工作正常。
但我们的要求只是从下到上呈现视图
答案 0 :(得分:4)
试试这个......
[self.navigationController presentModalViewController:prefDetails animated:YES]; instead of
[self presentModalViewController:prefDetails animated:YES];