简体   繁体   中英

What is the purpose of having WelcomeViewController in Anypic(ios,Parse)

I wonder what is the purpose of having a WelcomeViewController in Anypic since their is no WelcomeView associated with it. It checks if currentUser exists, if no then LoginViewController is presented, if yes then proceed to TabBarController. Why not putting the logic in WelcomeViewController to AppDelegate, or just create an empty ViewController as what is done is AnyWall app? Thank you Zach

By following the code in GitHub, the best answer i can give you is that they do this to get order in their application design. If like you said they placed all the code into the app delegate, then the AppDelegate will be messy and un-ordered (you can see that WelcomeView has a lot of functionality code).

There is no right and wrong, if the code works then the code works. But if your code if built in a good design, you will have a lot less work if you wish to alter something in the future.

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