开发者

How do I hide an infoButton in a utility app from the MainViewController when the infoButton is in the RootViewController?

开发者 https://www.devze.com 2023-01-09 18:09 出处:网络
How would I go about updating an object declared in the RootViewController from my MainViewController?

How would I go about updating an object declared in the RootViewController from my MainViewController?

I'm attempting to hide my info button when my iAd is tapped, I have all the relevant pieces of code for the iAd in place, but can't figure out how to code the action. I saw an example of a similar situation online that was like this:

((MainViewController *)parentViewController).infoButton.hidden = @"";

I haven't been able to get that to work though, I just need this one value modifiable from the MVC, can anyone gi开发者_运维问答ve me a simple suggestion?

P.S. I'm a total n00b and a snippet of code would help a great deal, I'm kind of learning as I go, thanks!


I figured this out through use of the NSNotificationCenter

0

精彩评论

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