开发者

How to change the view if I am not present in the viewController class? [duplicate]

开发者 https://www.devze.com 2022-12-27 23:57 出处:网络
This question already has answers here: 开发者_开发技巧 Closed 10 years ago. Possible Duplicate:
This question already has answers here: 开发者_开发技巧 Closed 10 years ago.

Possible Duplicate:

Code is exectuting but the view is not loading when called form a function?

I am doing an app with about 6-7 views and their corresponding controllers. I am in a view with a toolbar and button.

When I click this button a popup view comes and my control is being moved to the popup view's Controller. But my view is still the same.

From this popupview Controller's class, I want to change my original view. But since I am not in my original viewControllers class, I am not able to change it.

How can I overcome this? Can anyone plz help me?


If you're adding the Popup View as a Subview of the Original ViewController's View, you can access the parent view using superview.

UIView *parentView = popupViewController.view.superview;

then you can change the parentView as needed.

0

精彩评论

暂无评论...
验证码 换一张
取 消