简体   繁体   中英

ios - Code VS Storyboard opinion

I have just spend a lot of hours re writing my app to have it all in code instead of using storyboard. Mainly because I wanted to understand what the storyboard did for me.

Obviously with this, I have noticed that my files have become severely big in terms of lines of code.

Apple seems to be more in favor of storyboard then writing lines of code, as per their WWDC videos.

As fellow developers do you still feel that writing everything out in code is the better way to go? I hope to get a good few opinions on this as I want to see if my feelings on the matter are supported by your ideas, having done this for a longer period of time no doubt.

Thanks in advance.

There are few advantages and disadvantages of both.

Advantages of adding controls by Code

  • You can prefer writing everything to code if most of controls are dynamic. So that you can load controls whenever required.

  • Its easy to reuse code and make application more dynamic eg you want to make UI themes for application

Advantages of Storyoard/ XIB

  • Using Storyboard/ XIB load all controls(Better if application is static) at once for that view you have to just bind properly.

  • Design UI with storyboard/ XIB is easy as compare to code.

These are few advantages of both as per my understanding.

making application through the code, helps developer lot, it gives flexibility.but going through the storyboard decreases lines of code. for mobile application development decreased number of lines codes or less code is always welcome.

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