Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/69.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.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
Mysql 将UItableview从普通视图控制器推送到局部视图控制器_Mysql_Ios_Uitableview_Push_Viewcontroller - Fatal编程技术网

Mysql 将UItableview从普通视图控制器推送到局部视图控制器

Mysql 将UItableview从普通视图控制器推送到局部视图控制器,mysql,ios,uitableview,push,viewcontroller,Mysql,Ios,Uitableview,Push,Viewcontroller,我在Viewcontroller中有一个自定义大小的UItableview(由于某些原因,它不能在navigationcontroller中)。设置为基于mysql导入核心数据显示多个单元格。当用户单击未知行时,如何将它从一个视图控制器转换到另一个视图控制器?如果您已将delegate设置为UITableView,则-(void)tableView:(UITableView*)tableView didselectrowatinexpath:(NSIndexPath*)indexPath将在用户

我在Viewcontroller中有一个自定义大小的UItableview(由于某些原因,它不能在navigationcontroller中)。设置为基于mysql导入核心数据显示多个单元格。当用户单击未知行时,如何将它从一个视图控制器转换到另一个视图控制器?

如果您已将
delegate
设置为
UITableView
,则
-(void)tableView:(UITableView*)tableView didselectrowatinexpath:(NSIndexPath*)indexPath将在用户点击任何单元格时对您的委托调用。然后,您只需在数组中找到一个模型或与该索引路径相对应的任何模型
(最常见的情况是
[array objectAtIndex:indexath.row]

,然后您可以将另一个视图控制器推送到导航堆栈中,或者在不使用导航控制器的情况下执行一个模式视图控制器,然后我将只使用presentViewController:animated:completion:在tableView:didSelectRowAtIndexPath方法中