Monday, May 15, 2017

UIScrollView Setup

I ALWAYS forget these steps. So I am finally going to blog them so I remember.

1. Setup UIScrollView and Your Content UIView

  1. Add UIScrollView to Storyboard. Size to your liking.
  2. Set the top, trailing, bottom and leading constraints.
  3. Add a UIView to the UIScrollView.
  4. Set zero point constraints for your top, trailing, bottom and leading constraints.

2. Horizontal or Vertical Scrolling?

Horizontal Scrolling

  1. Add a WIDTH constraint to the UIView with a number that is wider than the main view's width.
  2. Right-click drag from the UIView to the main view and set constraint: Equal Heights
    (Note that you want to scroll sideways so the height will not be changing.)

Vertical Scrolling

  1. Add a HEIGHT constraint to the UIView with a number that is longer than the main view's height.
  2. Right-click drag from the UIView to the main view and set constraint: Equal Widths

3. Setup Storyboard

  1. Select your Scene (ViewController)
  2. In the Size Inspector, change Simulated Size from Fixed to Freeform.
  3. Change the Width or Height to whatever you set in the previous step.

(Xcode 8)

Sunday, May 14, 2017

Create a Horizontal UIPickerView! (iOS, Xcode 8, Swift 3)

Horizontal Picker views look great and are fairly easy to implement after you know how. Watch the video to learn!



Monday, May 1, 2017

SwiftUI Search & Filter with Combine - Part 3 (iOS, Xcode 13, SwiftUI, 2...

In part 3 of the Searchable video series, I show you how to use Combine in #SwiftUI for the search and filter logic connected to the searcha...