您的位置:首页 > 移动开发 > IOS开发

IOS 页面跳转

2015-08-01 11:09 417 查看
[code]@property (strong, nonatomic) LoginViewController *loginViewController;

  UIStoryboard *story=[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
        self.loginViewController=[story instantiateViewControllerWithIdentifier:@"loginFirstPage"];
        [self.navigationController pushViewController:self.loginViewController animated:YES];


[code]//点击文章列表跳转到文章详情页
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    NSIndexPath *indexPath = [self.tableView indexPathForCell:sender];
    UIViewController *destination = [segue destinationViewController];
    if ([destination respondsToSelector:@selector(setData:)]) {
        [destination setValue:[self.infos[indexPath.row] uid] forKey:@"data"];
        //        [destination setValue:[self.infos[indexPath.row] title] forKey:@"titles"];
        //        [destination setValue:[self.infos[indexPath.row] summary] forKey:@"summaries"];

    }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: