IOS 頁面跳轉

@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];
//點擊文章列表跳轉到文章詳情頁
- (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"];

    }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章