Code Monkey home page Code Monkey logo

autolayout-textview's Introduction

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.

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.

autolayout-textview's People

Contributors

fislabstest avatar fs-lms-test-bot avatar ianrahman avatar joelconnects avatar markedwardmurray avatar misterfifths avatar sarogers avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autolayout-textview's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.