Re:Native Mobile Apps Styled With CSS - Pixate (YC S12) Laun...
by Zev on Wednesday January 16, 2013 @01:04PM
(#5068102)
Can you give an example of some things that you subclass?
Re:Native Mobile Apps Styled With CSS - Pixate (YC S12) Laun...
by reidmain on Wednesday January 16, 2013 @03:05PM
(#5068744)
From Foundation? NSDictionary, NSArray and NSOperation instantly jump to mind.
Re:Native Mobile Apps Styled With CSS - Pixate (YC S12) Laun...
by Zev on Wednesday January 16, 2013 @11:25PM
(#5070924)
What do you get out of subclassing NSDictionary or NSArray that you don't get out of a category?
Re:Native Mobile Apps Styled With CSS - Pixate (YC S12) Laun...
by reidmain on Friday January 18, 2013 @09:34AM
(#5078733)
Well in this case I subclassed them so I could have the backing data source only weakly reference the items in the dictionary/array and because I subclassed them I can use them wherever NSDictionary or NSArray is an accepted parameter.
Apple's documentation also gives some examples:
https://developer.apple.com/library/ios/#documentation/Cocoa...
https://developer.apple.com/library/ios/#documentation/Cocoa...
Also I wasn't talking specifically about UIKit. Foundation is another great framework that I've subclassed many times.
It's not perfect but Apple puts a lot of work into documenting how to subclass their frameworks. Third-party UI frameworks like this are much less forgiving.