How to Use UIImagePickerController for a Camera and Photo Library in Swift 3.0.

Almost every iPhone and iPad now has a camera. Many people want to use a camera in their apps for various reasons. While you may not be building the next Instagram or Twitter, there are many places where photo documentation comes in handy. There are two ways to use the camera. The more powerful and …

Using Trait Collections for Auto Layout and Size Classes

Suppose you have a project with adaptive layout, but you hate storyboards. You've coded all your layout and then find something horrible: it only codes well in portrait on an iPhone. You've decided that some of the elements need to be in a different place in portrait and completely different places on an iPad.  In …

How to Add Stack Views Programmatically and (almost) avoid AutoLayout

Some people don't like Interface Builder and like to code instead. Sometimes your layout is so dynamic you need to lay out in code. In either case, programmatic layout of views becomes the answer instead of auto layout. In Xcode 7 Apple introduced stack views. In an earlier post, I introduced stack views in Interface …