如何将数据从UIViewController传递到UIViewController的内部UITabBarController之一?
以下几点不起作用:
let hospitalsController = segue.destination as! postRequest
hospitalsController.hospitalName = "Hospital Name"
当尝试上述代码时,我会得到以下错误:
Could not cast value of type 'UITabBarController' (0x10d05f418) to 'Projec
当我向选项卡条控制器推送数据时,我从集合视图单元格中传递数据。
我有一个导航控制器,我把一个导航控制器推到一个表控制器上。所以TabBarController在导航控制器中。
数据传递与这段代码一起工作得很好,这是我准备进行转换的时候。
let indexPaths = self.collectionView!.indexPathsForSelectedItems()!
let indexPath = indexPaths[0] as NSIndexPath
let row = indexPath.row
let tabar = segue.de
我已经创建了从UIViewController类派生的MasterViewController的两个实例
_masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController_iPhone" bundle:nil];
// second instance with same class and duplicate nib view
_favItemMasterVC = [[MasterViewController alloc] initWithNibName:@