简体   繁体   中英

load information after login objective-c

I have a login page with two button one for facebook login one with email and pass login,after login I will load some information in table, my question is what is the best way to load this information, create two .xib file tableView for each login, or just one .xib file.

Thanks in advance!

I would suggest the following solution :

1 create a second view, call it something like ListVC.xib.

2 in ListVC add a member NSMutableArray called listData.

3 in your first window, said loginVC.xib, each of your button will load data in an NSMutableArray, each in its own way. then each open ListVC.xib, and set listData member to the array it just load.

If you use this solution, or something close, you will not create 2 ViewController, with nearly the same code. Basically, copy and pasting your code is bad. If you need to modify it, it will become much more complicated.

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