我有两个观点 - 一个是viewcontroller
,另一个是enterdetails
。
我的问题是我的观点 - enterdetails
在点击viewcontroller
按钮时加载到同一视图(alertview
),但未导航到enterdetails
#import "enterDetails.h"
@interface enterDetails ()
@end
@implementation enterDetails
enterdetails.m
- (void)viewDidLoad
{
[super viewDidLoad];
UIImageView *tab_image=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 100, 100)];
tab_image.image=[UIImage imageNamed:@"bar.jpeg"];
[self.view addSubview:tab_image];
// Do any additional setup after loading the view from its nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
viewcontroller.m(alertview)
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex == 0) {
enterDetails *det=[[enterDetails alloc]init];
[self presentViewController:det animated:NO completion:nil];
}
}
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@" Already Sucessfully Register"delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:@"enter", nil];
[alert show];
[alert release];