我的观点是没有导航到另一个视图

时间:2013-11-23 07:07:20

标签: ios navigation

我有两个观点 - 一个是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];

0 个答案:

没有答案