Monday, June 5, 2017

Make It Rain Or Snow Images With The CAEmitterLayer (iOS, Xcode 8, Swift 3)


How do you make images fall randomly from the top of the screen, like it is raining or snowing?



It is done with a thorough knowledge of the CAEmitterLayer! But do not worry, I make this super easy for you to understand and use the CAEmitterLayer. You can do a lot of very cool things with the emitter but I will be showing you just one cool thing: how to make it "snow" images.



You will learn how to setup and position the CAEmitterLayer. You will learn how to add images and information on how that image should be shown with the CAEmitterCell object.



At the end of this video you will have the understand and skill to create your own emitters and show your own images coming from the emitter.

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

Customizing UIPickerView (iOS, Xcode 8, Swift 3)

The UIPickerView allows you to put your own UIView in each cell and put whatever you want in there. Here is how you do it!



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...