GithubHelp home page GithubHelp logo

jbates99 / simpleavatar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devmountain/simpleavatar

0.0 2.0 0.0 197 KB

Simple iOS app showing how to build a customizable avatar view using auto layout and IB Designable views.

Swift 100.00%

simpleavatar's Introduction

SimpleAvatar

Simple iOS app showing how to build a customizable avatar view using auto layout and IB Designable views.

Usage

During class, we will start at the 1-class-start tag. We will talk a little about @IBDesignable, @IBInspectable, and using didSet before proceeding.

The focus of class will be understanding how to add views programatically. The bulk of our time should be spent understanding auto layout.

Auto Layout

Auto Layout is a powerful way to layout views for iOS development in a future-friendly, device-agnostic way. The best resources to get started learning about it are found here:

There are four ways to implement auto layout constraints (of class NSLayoutConstraint), and should generally be done in the following order of preference:

  1. Interface Builder
  2. Anchor-based constraints
  3. Visual Format Language
  4. Base API

There are three problems that can occur with auto layout, and they are almost always related to contraints:

  1. Unsatisfiable constraints (shows as errors in console)
  2. Ambiguous layout (can be seen in console by pausing application and entering po [[UIWindow keyWindow] _autolayoutTrace])
  3. Undesirable layouts (everything works properly, but is not laid out as you want)

simpleavatar's People

Watchers

James Cloos avatar  avatar

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.