我有2类:在ClassView访问变量在其他类
classVC: ViewController
classView: UIview
如何访问navAndStatusHeight
从classVC?
int navAndStatusHeight = self.navigationController.navigationBar.frame.size.height
+ [UIApplication sharedApplication].statusBarFrame.size.height;
是ClassView中classVC的子视图? –
是的,这是一个子视图 – Edgar
如果它是子视图,你可以访问父视图的所有属性 –