Live rendering

- So storyboards and Interface Builder have been…an amazing way to create your user interfaces.…There's a lot of powerful features in there,…but there's also some serious limitations.…So here I have a starting project called LiveRendering,…and here I'm in the main storyboard, and I have a…a view in the middle of my view controller,…which actually is a custom view class.…So let's open up CustomView.swift and you'll notice that…all it is, is simply I have an override for drawRect…which is filling it with color and the color is black.…

Now over in the storyboard, it would be nice to see that.…So in the past we haven't actually been able to see a live…preview of how our custom views actually look inside of…Interface Builder, but we can now do that in Xcode 6.…So let's go back to the custom view class.…In order to see a live preview, all I have to do is to…add the IBDesignable keyword before my class name.…So I'm going to use the @ sign IBDesignable.…

And with that one word, I'm essentially telling…Interface Builder, "Hey give me a live preview…

Resume Transcript Auto-Scroll

Author

Released

11/17/2014

iOS developers: explore the exciting updates and new features in the iOS 8 SDK in this hands-on course by Lee Brimelow. First, familiarize yourself with Swift, the new programming language for iOS, and check out the latest offerings in Xcode 6. Learn how to use playgrounds to quickly preview code in real time, and explore a brand-new way of easily targeting multiple screen sizes: with unified storyboards. See how to broaden the user experience for your apps via app extensions, which let you add functionality such as custom keyboards, photo filters, and more. Then see how to track a user's heath info—including nutrition, fitness, and vitals—with the HealthKit framework, and connect with and control smart accessories for the home with the HomeKit framework. The course also includes tutorials on working with Handoff to sync between iOS and OS X and on using authentication with Touch ID.