简体   繁体   中英

Performing operations before table view loads,

I'm working on a turn-based iOS game and i am trying to write code currently to display a table of my custom cells generated from an NSArray of GKTurnBasedMatches . I have a simple question - How do i add code to a table view that will execute early enough to populate my table view? When i try it in ViewDidLoad , it is too late and empty. If there were an init i would stuff it in there.

You have methods that run before viewDidLoad.

For example, the init method for the controller.

在应用程序委托中做您的事情,并在ViewDidLoad的所有内容之前在ViewDidLoad的开头使用它

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM