Danial Kosarifa
Danial Kosarifa

Reputation: 1074

Few beginner questions regarding the GUI in IOS development via Swift?

I am an enthusiastic beginner in iOS development and I have faced some questions that may occur to many other beginners as well. Please note that I am not asking for opinion or suggestion, instead need some clarification to use the best option that I am offered.

  1. Speaking of designing the apps interface via Swift. We have three options which are : programmatically, StoryBoard or Xib file. The question is, can employ more than one of these three for the same project or even the same page(screen) in my app?

  2. When I am using Storyboard I can drag and drop different objects and use them. How ever I either need to set my own constrains for every single one of them or I can select all and click the set required constrains and they will be all set. But how come although I've defined the constrains my view is not responsive on various devices? Based on my understanding the only way to get the responsive in all the iOS platforms to set the constrains programmatically! Feel free to correct me if I am wrong.

  3. It may not be the best practice but I personally am more fond of back-end comparing to the front end. Is it possible to design all the back-end first and set all the constrains at the very end!?

Upvotes: 1

Views: 225

Answers (1)

Dhanunjaya
Dhanunjaya

Reputation: 500

1.Speaking of designing the apps interface via swift . We have three options which are pragmatically , Story Board or Xib file . The question is can employ more than one of these three for the same project or even the same page(screen) in my app ? ]

You can use storyboard for UI designing and also Xib's also you can use for example if you want design custom alertviews. This is just an example.

2.When I am using storyboard I can drag and drop different objects and use them . How ever I either need to set my own constrains for every single one of them or I can select all and click the set required constrains and they will be all set . But how come although I've defined the constrains my view is not responsive on various devices . (Based on my understanding the only way to get the responsive in all the IOS platforms to set the constrains pragmatically!! Feel free to correct me if I am wrong . )

First understand the Autolayouts in iOS. This is very powerful tool for iOS developers for responsive layout.

We can do Autolayout in either ways i.e., programmatically or Storyboard. But I can suggest for storyboard is better. In Some cases we can use programmatically.

Follow these links:

Autolayout for beginners

Introduction to Autolayout

3.It may not be the practice but I personally am more fond of back-end comparing to the front end . Is it possible to design all the back-end first and set all the constrains at the very end !?!

As per my view, First design responsive UI, Check in all devices. In latest Xcode, We can even check UI in all screens.

Dont use multiple storyboards for every iOS device. Use Autolayouts for desgin UI with single screen in storyboard

Upvotes: 2

Related Questions