Regarding Relatively setting UI in iOS - ios

As in Android we can set in relativeLayout, textView below Button in xml file. Is there anything to set views relatively in IOS through storyboard or dynamically!! Please help as I am new to iOS, thanks in advance

There are constraints that you can add to elements in storyboards and there is autolayout.
I'd recommend looking at https://developer.apple.com/library/ios/documentation/userexperience/conceptual/AutolayoutPG/Introduction/Introduction.html to see more about autolayout, it should let you set your layout dynamically

Related

How to design an advanced UIScrollView Xamarin.ios?

I had a problem using a UIScrollView with xamarin.ios
I used the scrollView normally, and everything is going well, but the point is that I can't adjust the tools size"Constraints" inside the ScrollView, for example I have many sizes for ios phone screens, so I don't want to make a specific width and hight for tools, and that what storyboard force me to do.
any ideas, open source or tutorial.. thank you
AutoLayout on UIScrollView is different from UIView.
Refer to my recent answer Auto Layout within scroll view , also a demonstrative demo in the comment.

How to convert Xib based project to Storyboard with auto layout

I'm going to get heat for posting this question that has probably been answered multiple times before, but I wanted to get a new understanding on how to incorporate Storyboards and auto layout into my app.
The whole thing is done, but I've used countless Xib files that don't even have a proper view layout to them. Everything related to image position and size is done through hard-coding CGRect(x,y,w,h) frames. I'm not using auto layout, and my Xib files are not populated with proper views (just temporary views to provide the IBOutlet connections).
What do I start with first? Auto layout or transfer everything to Storyboard? What documents/guides can I read to help me with this?
I'm using Xcode 7.1.2, and iOS 8.1.
All the Xibs needs to converted to Storyboards first, so that the entire app has all its Screen is reflected in the Storyboard.
Once this is done you should start implementing the Autolayout, by removing the hardcoding from the code and managing them via the StoryBoard scenes.

ScrollView using storyboard

I'm new to swift programming and storyboard usage. I want to know if it is possible to place my views inside a ScrollView using Storyboard and AutoLayout but visually. I'm not an expert so programming the constraints is a little hard for me now.
If it's possible can someone point me to a good starting point using xCode 6+. I'm planning to use iOS8+ as a requirement.
Thanks all!
It's pretty easy!
I've written a tutorial that explain how to use UIScrollView with Auto Layout in iOS 8 and Swift.
Take a look, hopefully will help you :).
https://www.dribba.com/blog/2015/07/21/scrollview-autolayout-ios8-swift/
Yes, it is possible. I do it all the time in my current projects.
Just make sure you connect (auto layout constraints) your scrollable contents to all sides of the scrollview, so that it can calculate the content size correctly.
Autolayout + UIScrollView is not a simple topic. Apple has a technical note on it:
https://developer.apple.com/library/ios/technotes/tn2154/_index.html
I found these tutorials useful:
http://natashatherobot.com/ios-autolayout-scrollview/
http://mobileoop.com/auto-layout-advanced-techniques-for-ios-8-and-7-using-xcode-6-on-storyboard
http://spin.atomicobject.com/2014/03/05/uiscrollview-autolayout-ios/?utm_source=maniacdev-ao&utm_medium=social&utm_campaign=uiscrollview-autolayout-ios

Change from LTR to RTL with storyboard on iOS 7

So, i've been looking anywhere an explanation about how to implement Mirroring on Storyboard's Auto Layout - not programmatically.
I have an app that support a few languages and when i turn the language to Hebrew, for example, i have a label that change it's text to hebrew. so far so good. what i want to do next is to change the label's place like a mirror.
Can anyone help me understand how to do it on Storyboard Auto Layout?
Thanks.
After doing some research, i found the answer:
First, you have to implement an Internationalization. you can follow Ray's Wenderlich tutorial for Internationalization by enter this link:
http://www.raywenderlich.com/64401/internationalization-tutorial-for-ios-2014 .
Now, on Storyboard, all you have to do is putting some constraints to your label:
put trailing and leading constraints to the label you want to reflect like a mirror when the user switch the language, and that's it.
It's much more easy then design a new Storyboard and you're using the elements that Apple gave you, so i guess it's the right way too.
Hope it helps.

Can a storyboard handle orientation changes automatically?

I would like to design my iPhone App so that, e.g., my buttons are centered, or my inputs are set to the full viewport width and so on. Is this possible using only the storyboard, or do I have to create every view element in the controller and then alter it on orientation change?
Yes this is possible with "AutoLayout",
I would recommend this tutorial for a better understanding:
http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2
In Xcode 5, Auto-layout is enabled by default. You also may want to try adding the recommended constraints from the Editor menu.

Resources