小编Usm*_*Ali的帖子

CoreBluetooth框架和IOBluetooth框架之间的区别

什么是CoreBluetooth框架和IOBluetooth框架(用于MAC应用程序)之间的区别?

xcode bluetooth bluetooth-lowenergy

3
推荐指数
1
解决办法
1977
查看次数

第二次Xcode没有调用ViewDidLoad

我有一个tableViewController,我从中导航到UIViewController.为了保存indexPath.row的值,我使用了一个整数,并基于该整数操作在UIViewController中执行.问题是,当我按下后退按钮并选择另一个表索引时,它会导航到UIViewContoller,但执行的操作是第一个.第二次不调用ViewDidLoad.这是我的代码.

TableView代码:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (!self.iaRecipieViewController) {
        self.iaRecipieViewController = [[[iRecipieViewController alloc] initWithNibName:@"iRecipieViewController" bundle:nil] autorelease];
    }
    if (indexPath.row == 0) {
        self.iaRecipieViewController.myLableArray =labelSoupArray ;
    }

    if (indexPath.row == 1) {
        self.iaRecipieViewController.myLableArray =labelSoupArray ;
    }

    if (indexPath.row == 2) {
        self.iaRecipieViewController.myLableArray =labelSoupArray ;
    }
    // custom string is an NSinteger
    self.iaRecipieViewController.customString = indexPath.row;
    NSLog(@"  int  %i",self.iaRecipieViewController.customString);
    NSLog(@"index path %i ", indexPath.row) ;

    [self.navigationController pushViewController:iaRecipieViewController animated:YES];

    [detailTable reloadData];
}
Run Code Online (Sandbox Code Playgroud)

UIViewController代码.

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional …
Run Code Online (Sandbox Code Playgroud)

uitableview uiviewcontroller viewdidload ios

0
推荐指数
1
解决办法
4718
查看次数