-1
我有兩個視圖控制器TestViewController和SecondViewController。 我也有相應的視圖對應於它們的TestView和SecondView。如何將數據從一個viewController推送到另一個不使用Segues
請指導我將數據從一個視圖控制器推送到另一個不使用Segues的步驟。
我有兩個視圖控制器TestViewController和SecondViewController。 我也有相應的視圖對應於它們的TestView和SecondView。如何將數據從一個viewController推送到另一個不使用Segues
請指導我將數據從一個視圖控制器推送到另一個不使用Segues的步驟。
你可以使用 Segues它很容易使用。例如 :你可以用你的方法Objective-C代碼裏面
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
// Make sure your segue name in storyboard is the same as this line
if ([[segue identifier] isEqualToString:@"YOUR_SEGUE_NAME_HERE"])
{
// Get reference to the destination view controller
YourViewController *vc = [segue destinationViewController];
// Pass any objects to the view controller here, like...
[vc setMyObjectHere:object];
}
}
在上面的鏈接,你擁有所有的解釋如何將它... :)希望它幫助。
爲什麼你不能像阿迪阿扎里亞descibes使用賽格? –