Ios 通过按按钮在其他视图控制器中隐藏图像
我有一个主ViewController No.1,它包含按钮,另一个ViewController No.2,它包含在voidviewDidLoad中默认设置为隐藏的图像 我需要在按下1号按钮时转到2号ViewController并在2号ViewController中显示图像 我在ViewController No.1中声明了IBActionViewButton:idsenderIos 通过按按钮在其他视图控制器中隐藏图像,ios,iphone,uiviewcontroller,xcode7,Ios,Iphone,Uiviewcontroller,Xcode7,我有一个主ViewController No.1,它包含按钮,另一个ViewController No.2,它包含在voidviewDidLoad中默认设置为隐藏的图像 我需要在按下1号按钮时转到2号ViewController并在2号ViewController中显示图像 我在ViewController No.1中声明了IBActionViewButton:idsender 我在ViewController No.2中声明了@property strong,非原子UIImage*图像使用准备
我在ViewController No.2中声明了@property strong,非原子UIImage*图像使用准备segue!!!要发送bool值并使用该bool值隐藏图像视图,这实际上取决于您正在谈论两个同时的视图,例如在splitviewcontroller中,或者按钮打开第二个视图。您可以使用segue和prepareforsgue进行传递,或者使用全局变量和NSNotification进行更新。