0

This is my constraint

Constraints

I have made use of auto layout in my app, all the UI elements are visible in portrait mode:

But the view is incomplete in landscape mode.

How can I make my app look alike in both portrait and landscape view?

I am using Swift 2 in Xcode7.2.

Manee ios
  • 1,112
  • 11
  • 14

2 Answers2

0

use autolayout With Sizeclasses. read this artical

Muhammad Noman
  • 1,566
  • 1
  • 15
  • 21
0

When handling screen with UITextField you should always use something scrollable, either a UIScrollView or a UITableView. By using, you can easily update your screen UI. I'm highly recommended not to use UIScrollView, UITableView will be more easy. And yes, there's one well maintained library (3rd party) https://github.com/michaeltyson/TPKeyboardAvoiding which will handle your tableview position when your textfield will get focus.

Hemang
  • 26,840
  • 19
  • 119
  • 186
  • Sir I have developed my app on swift, but the code of TPKeyboardAvoiding is in objective C. How can I make use of it? If it is impossible please suggest other alternatives – Manee ios Mar 09 '16 at 08:25
  • You can do this by doing bridging header to use objective-c classes in Swift. Here's a possible [solution](https://github.com/michaeltyson/TPKeyboardAvoiding/issues/157). – Hemang Mar 09 '16 at 09:28