Adding IBInspectable to a UICollectionViewCell subclass One very useful feature I find is to add a IBInspectable background image to my views. In an entertainment app I’m currently building there is a designable cell that looks like this: @IBDesignableclass TrailerCollectionViewCell: MediaCollectionViewCell { @IBOutlet weak var lengthLabel: UILabel! @IBInspectable weak var bgImage: UIImage! { didSet { imgView.frame = self.bounds self.addSubview(imgView) imgView.image =…
Category: Swift 2
Swift 2 Tutorials and News
Being Swifty with Collection View and Table View Cells
Here’s a common scenario: You have a table view or collection view that has a variety of different types of content. You want to display varying cells based on these types of content, and they’re all mixed within a single section. Pardon the stand-in art, but it looks roughly like this: In the Objective-C world,…
Developing tvOS Apps for Apple TV [Part 2]
Looking for some help building your Apple TV tvOS App? I’m available for consulting and development, contact me. This is part 2 of the tvOS tutorial. If you haven’t gone through part 1 yet, I suggest you run through that first. Adding Interactivity In the first section we created a simple TVML document with a…
Developing tvOS Apps for Apple TV [Part 1]
Here’s what you’ll have at the end of part 2 of this tutorial if you follow along: Looking for some help building your Apple TV tvOS App? I’m available for consulting and development, contact me. Apple TV Developer Tools Before we get started you’ll need the Xcode 7.1 beta, which you can download here: Download…
Swift 2 – What’s new
Monday Apple announced Swift 2, and just about everything announced is an extremely welcome change. This post is a summary of Chris Lattner’s discussion in the WWDC video “What’s new in Swift”. Now, let’s run through them… Fundamentals enums can now be printed to the console and show the actually value instead of just (enum…