4 ms·
> Categories can’t formally conform to protocols I wasn't aware of that limitation, so I tried it out just now only to be certain. Works fine for me. ¯\_(ツ)_
by mpweiher 6y ago
> Categories can’t formally conform to protocols
I wasn't aware of that limitation, so I tried it out just now only to be certain. Works fine for me. ¯\_(ツ)_/¯
@interface UIViewBuilderSmalltalkViewController(storage) <MPWStorage>
@end
@implementation UIViewBuilderSmalltalkViewController(storage)
@end
Compiler correctly complained about the missing methods and Xcode kindly offered to add stubs for me:
/Users/marcel/programming/Projects/ViewBuilder/UIViewBuilderMockup/UIViewBuilderSmalltalkViewController.m:121:17: Category 'copying' does not conform to protocol 'MPWStorage'
/Users/marcel/programming/Projects/ViewBuilder/UIViewBuilderMockup/UIViewBuilderSmalltalkViewController.m:121:17: Add stubs for missing protocol requirements
- astrange 6y agoMaybe he meant classes (metaclasses)? Class itself is not typed, which definitely feels like a missing feature in the language.