My app is constructed with several UIViewControllers based on a UINavigationController. There are some attributes that become relevant in several different classes; for example the device (iPhone/iPad) or the device selected language (english/french/Chinese/etc...).
I assume this should be quite trivial, but I actually don't know how to do this (or how this feature is called in XCode): How can I create an a开发者_如何转开发ttribute that will serve all classes?
Should it be located in the AppDelegate file or someplace else?
I think you should create a singleton, so you could share data among your UIViewControllers. Here's a nice tutorial:
http://www.galloway.me.uk/tutorials/singleton-classes/
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论