Sunday, April 9, 2017

Sunday, March 26, 2017

Transparent TableView - Zelda App (iOS, Xcode 8, Swift 3)

Learn how to make your table view transparent so you can see the background through it. You will also learn a little about customizing the tableview's separator.



Closures - Zelda App (iOS, Xcode 8, Swift 3)

You may not be creating closures all the time but it is good to know about them and how they work because you will be using them ALL the time.


Wednesday, March 22, 2017

Play A Movie That Is In Your Project

On your Storyboard, add a "AVKit Player View Controller". Connect it with a Segue from a UIButton you put on the View Controller.

Like this:
 
import UIKit
import AVKit
import AVFoundation

class ViewController: UIViewController {
    
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        
        let destination = segue.destination as! AVPlayerViewController
        let url = Bundle.main.url(forResource: "myMovieName", withExtension: "m4v")
        
        if let movieURL = url {
            destination.player = AVPlayer(url: movieURL)
        }
    }
}
 

(Xcode 8.2, Swift 3)

Saturday, March 18, 2017

Introduction to iOS Threading - Zelda App (Xcode 8, Swift 3)

Get an introduction to threading in iOS to make your apps more responsive when another process is taking a long time.

Sunday, March 12, 2017

Show Execution Time (Elapsed Time)

Sometimes you want to see how long it took some code to execute. Here is an example of one way you could do this.
 
func myLongRunningFunction() {
    let start = Date()

    // Do you work

    let end = Date()
    let elapsedTime = end.timeIntervalSince(start)
    print("Elapsed Time: \(elapsedTime)")
}
 

(Swift 3)

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