Filters

Hide filters
Platform
Content Type
Difficulty

All Tutorials · 3 Results

Contained in: macOS Apprentice objective c
iOS & Swift

Chapter in macOS Apprentice

Powering Up Your Table

…visibleMovies = sortedMovies // 4 moviesTableView.reloadData() } How does this work? In order to sort using the table’s sort descriptors, convert the Swift Array into an Objective-C NSArray. Objective-C was Apple’s language before Swift and a lot of the older frameworks still use it. Use an NSArray method…
iOS & Swift

Chapter in macOS Apprentice

Using Cocoa Bindings

…make one change to the data first. Open EditViewController.swift and replace var movie: Movie? with @objc dynamic var movie: Movie? Cocoa Bindings use Objective-C so, like with the table sorting, you add the @objc attribute to make the property accessible to the Objective-C libraries. The dynamic attribute…
iOS & Swift

Chapter in macOS Apprentice

Using Swift in the Command Line

…many languages, there’s a different operator for assign and for equality. A single equals sign assigns the value on the right to the object on the left. The double equals sign checks if the two are the same. The ! sign is the not operator. You can use it paired…