Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iphone popviewcontroll问题_Iphone_Ios4 - Fatal编程技术网

iphone popviewcontroll问题

iphone popviewcontroll问题,iphone,ios4,Iphone,Ios4,这是我的代码,如何将selectedCountry和SelectedCountry1传递到profilepage 我尝试了,但没有得到任何值,请帮助我,如果下一个视图是detailViewController,则应该使用pushViewControllerAnimated:animated:而不是popViewControllerAnimated:。从逻辑上讲,push向前,pop向后 导航堆栈在《视图控制器编程指南》的一节中介绍 - (void)tableView:(UITableView *

这是我的代码,如何将selectedCountry和SelectedCountry1传递到profilepage


我尝试了,但没有得到任何值,请帮助我,如果下一个视图是
detailViewController
,则应该使用
pushViewControllerAnimated:animated:
而不是
popViewControllerAnimated:
。从逻辑上讲,push向前,pop向后

导航堆栈在《视图控制器编程指南》的一节中介绍

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // Navigation logic may go here. Create and push another view controller.

    //Some code to go to the next page
    NSString *selectedCountry = [arraycountries objectAtIndex:indexPath.row];
    NSString *selectedCountry1 = [arycountries objectAtIndex:indexPath.row];
    profilepage *detailViewController = [[profilepage alloc] initWithNibName:@"profilepage" bundle:nil];

    detailViewController.selectedCountry = selectedCountry;
    detailViewController.selectedCountry1 = selectedCountry1;
    // ...
    // Pass the selected object to the new view controller.

    [self.navigationController popViewControllerAnimated:YES];

    [detailViewController release];

您是如何在下一节课中获得detailViewController安装的?但是,我收到一条警告消息,显示UINavigationControl可能不会响应popviewcontroller,,先生,我只想通过popcontroller方法将SelecedCountries和selectedcountry1传递到上一页,,,
[self.navigationController popViewControllerAnimated:detailViewController
                           animated:YES];

[detailViewController release];