
Sign up to save your podcasts
Or


In this episode I will show you how to bind a Table View to an Array Controller in Cocoa, using Xcode 5.1 and OS X Mavericks.
We’re using Core Data to save our entries and – check it out – we’re not writing a single line of code!
Cocoa Bindings is one of the most exciting features in OS X development for me, and I hope that one day it’ll find its way into iOS too.
The project is also available on GitHub:
I’ve written more about how to do this here:
You may have heard this expression before: “You need to tear down your Core Data stack before you do xyz”. It’s frequently mentioned in the Apple documentation – sadly without telling us what on earth this means or how to do it.
I had assumed that it means rebuilding every aspect of Core Data, which without a complete app re-launch looks like a daunting task. But it’s relatively easy if you know how to do it. In this article I’ll show you how.
The secret is in the NSPersistentStoreCoordinator: all we really have to do is remove the store files from it and then add them again. Here’s a method that does just that and more (add it to your AppDelegate.m file to use it):
- (void)rebuildCoreData {Let’s go through this line by line: first we’ll lock and reset our managed object context for safe measure. This will make sure no other thread is working with it while we’re meddling.
Next we’ll iterate through all possible store files in our coordinator. The Core Data template provide only one, but just in case you have more, we’ll remove them all. In this loop we’re also deleting all files from the hard drive.
Then we set the variables of both coordinator and object context to nil – an ingenious tip from Luke McNeice (Thanks, Luke!) We do this because in the next step we can just call the custom initialiser for self managedObjectContext again which will rebuild the stack.
Finally we unlock the context so other threads can access it concurrently.
Here’s a fully working Demo Project on GitHub which employs this technique. It’s based on the Master/Detail Template and adds an extra button to tear down the stack in a running iOS App:
In this episode I will show you how to use the Git Branch feature in Xcode 5.1.
Branches are helpful if you’re developing your app. You can isolate a “working” version, create a new branch and fiddle with new features that may destabilise your project. You can then commit your changes – working or not – to a separate branch, and when all is stable again you can merge them back into the master project.
In this episode I will show you how to make use of Tags in Git. This is not supported in Xcode or GitHub for Mac at the time of this recording (April 2014). I will also show you how to utilise the Tag/Release feature on GitHub.com.
Tags are a useful feature if you want to mark versions of your software before you add new features. With Tags you can always go back to the code of a release.
We’re using Xcode 5.1 and the Terminal utility for this. Enjoy!
In this course I will show you how to create a searchable table view in Xcode 5.1 and iOS 7. The app will also be compatible with iOS 6.
There are six parts in total:
The whole course is about one hour in total. Enjoy!
Check out the full project source code here:
In this episode I will show you how to push an Xcode project to GitHub.com.
This is useful if you want to share code you have written with others. The GitHub for Mac app makes this a breeze because it talks to GitHub and creates a remote repo on your behalf. It also sets that new repo as a remote in your project.
From the publisher's feed