I wanted to change the initial focus in an NSDatePicker to the day instead of the month as you get by default. Searching around on the web, I found that NSDatePickerCell has a private ivar, _indexOfSelectedSubfield, which can be used to change the focus in ASOC like so:
set picker's |cell|()'s _indexOfSelectedSubfield to 2
This works fine, but I’m writing this app in Objective-C, and I can’t get it to work there. I keep getting compiler errors that the ivar is private. Why does this work in ASOC? Should not the ivar be unavailable there too? Is there something about the bridge that gets around the @private directive, and if so, is this general? And, is there a different way to accomplish this task in Objective-C?
Ric