Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the ios equivalent to android xml? [closed]

So me and my coworker have finished our app in android. Now, im starting ios/swift/xcode. And it seems i have two options: Storyboard (terrible, because it makes a lot of assumptions when i drag and drop things, just like in android). Second, i hard code all the ui, which is a pain, because I have no idea what its going to look like until i run it.

In android i wrote all my layouts in xml, because it was great seeing what my layout would look like constantly, and I had full control of my layout (no assumptions of what the padding would be, margins, and what type of layout). After writing my xml i would hook it all up in java and it was beautiful.

Now in ios, i dont see that kind of development design. And I want to develop in the same way as that or something close, or maybe the "most optimal" practice. I hope someone can provide a really good insight on how to approach this.

like image 835
TheQ Avatar asked Mar 28 '17 05:03

TheQ


2 Answers

Like Android XML, iOS also used XML file for Designing the UI part call Storyboard or nib file. if you could Right-Click and select Open As "Source code" you will find XML code their.

The way android used Layout for UI is different from iOS. iOS used Auto-layout technology to set Margin and layout. So you could only go for Drag and drop UI in screens of go for adding UI element programatically.

like image 151
Avijit Nagare Avatar answered Oct 07 '22 18:10

Avijit Nagare


You can see development design side by side by switch to Assistant editor which is available on top right side of Xcode. Then select preview. It will be the almost same as in real device.Check these image you will get clear idea

Before this you have select one ViewController which you want to check.

enter image description here enter image description here

like image 32
Gowtham Namuri Avatar answered Oct 07 '22 19:10

Gowtham Namuri