iOS vs Android

来源:互联网 发布:3d软件下载. 编辑:程序博客网 时间:2024/06/15 17:57

IOS vs Android


IOS view all use UI tool in storyboard


IOS mapping code with UI element   in 

“Referencing page” by manually drag the code property with storyboard UI element

The inside logic should be storyboard xml config the Object Id to class.

(in android, we should manually write the id in xml and manually write the code findById in java)


Android, every activity to find the view layout (the configuration), 

IOS, every story board view (like the configuration file)  to find the controller class

(So in IOS, no need to write setLayout(main_layou.xml), iOS will do it according to storyboard custom class)

(Meanwhile, also no need write findElementById(),  the binding if config in storyboard)


IOS has bind logic inside storyboard

  1. it will make it hard to find, not like search code
  2. it also allow write code to bind, so there are two ways to bind, code has high priority, it will confuse
  3. it also has some config inside storyboard, like tableview identifie
  4. not easy to document and descript, difficult to learn
  5. Does IOS support prefined color value?

IOS has the view element config inside storyboard (like a lot of tableview property, enableUserInteraction, refresh view, define statice table)

IOS has the action inside storyboard (like segue, don’t need write button click jump)


IOS view controller page jump use segue, data are transfer by view controller class method


ViewDidLoad == OnCreate  only create once

ViewDidAppear == OnStart   calls every time appear


(Android layout combination could 1. modularize the whole page to small pieces  2. reuse the layout in different page)

IOS can’t just write include xib inside storyboard

(Like android layout include layout, can’t simple do the layout combination)

The common way is that xib (a small UI element) has its code implementation to be a view.  the view class wrapper layout and code.  In storyboard define the component custom class to that class.

(Like android create custom view and use  custom view in layout)

But iOS has a intermediate way:  not create the view class, but change the xib owner to be your view controller, you need to write loadNib and addView in view controller programmatically, 

(Corresponding to android layout modularize the whole page to small pieces and the piece won’t use in other pages)


https://savvyapps.com/blog/how-to-start-android-development-with-an-ios-background


0 0
原创粉丝点击