Skip to content

imryan/autolayout-textview

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoLayout-TextView

Instructions

Check out the screenshots below. Your goal is to recreate the interface, using autolayout anchors in code. You'll need to make a project from scratch for this lab.

Here are some layout details:

  1. The left button is 10 pts from the left of the screen, and the right is 10 pts from the right. Both are 10 pts from the bottom. Use the default width and height for the buttons.
  2. There is one UITextView that is 20 pts from the top, 10 pts from the left, 10 pts from the right, and 20 pts from the top of the UIButtons.

After you've set things up, make sure your layout looks correct in both landscape and portrait. Ah, the magic of autolayout!

Extra Credit

  1. In portrait mode, leave the padding between the UIButton and the UITextField at 20 pts. In landscape, decrease it 10 pts. Hint: you can listen for a rotation event and examine the new size class. Check out Joe's blog post for details.
  2. For devices at least as large as an iPhone 6, increase the padding between the UIButton and the UITextField to 30 pts. Hint: more size classes!

Screenshots

Portrait

Landscape

View AutoLayout-TextView on Learn.co and start learning to code for free.

View Autolayout Textview (Layout Anchors) on Learn.co and start learning to code for free.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published