Xcode now generates an empty category. Why?

Viewed 1442

I noticed this while using iOS6 beta 3

When I create a new subclass of a UIViewContoller (no other parent classes generate this behavior that I've noticed), the .m file now has an empty category at the top of the file. In the past when learning about categories I noticed that some people would use this same technique to indicate private methods (although not truly private).

Is that what the intent is here? Has there been any change to making things actually private now? I notice the @private directive out there too.

What is your person coding style regarding private vars and methods?

UPDATE: Since XCode is pushing us to use the class extensions, I went ahead and used them for private methods/ivar for this project. I found a drawback though. I saw that I could reuse one of my subclassed UIViewControllers along with all of it's UIButtons, UILabels, etc.... I had this inheritance: UIViewController <- FirstViewController <- SecondViewController.

Well, all of the private methods that I put in the class extension of FirstViewController do not pop up in the autocomplete when I code in SecondViewController. A slight annoyance....

1 Answers
Related