How do I access my viewController from my appDelegate? iOS

后端 未结 6 2181
遇见更好的自我
遇见更好的自我 2020-11-28 05:31

I have an iOS app I created as a \"view-based app\" in xCode. I have only one viewController, but it is displayed automatically, and I see no code that ties it to my appDel

6条回答
  •  抹茶落季
    2020-11-28 05:46

    How about using good old fashioned NSNotifications to send a message from your app delegate to anyone listening (e.g. your view contorller) that something needs to be updated? or you can use Key Value Observing so your view controller can be watching some property in your app delegate.

提交回复
热议问题