I\'m was playing around with the standard sample split view that gets created when you select a split view application in Xcode, and after adding a few fields i needed to ad
In the course of your experiment, you've set up an endless loop which is why the simulator goes non-responsive.
Calling self.detailItem
within the scope of setDetailItem:
calls setDetailItem:
recursively since your class implements a custom setter method for the property detailItem
.
I would refer you to the Apple documentation on declared properties for the scoop on properties, ivars, etc; but briefly, declared properties are a simplified way of providing accessor methods for your class. Rather than having to write your own accessor methods (as we had to do before Objective-C 2.0) they are now generated for you through the property syntax.