Smartling / ios-lqa-sdk

Smartling Mobile SDK for iOS (Mobile Context, In App Review, Mobile Delivery Network)
Other
3 stars 2 forks source link

Don't use categories to implement -awakeFromNib #7

Closed lilyball closed 7 years ago

lilyball commented 7 years ago

By using categories to implement this method, you're going to have a problem if UIKit ever decides to implement this method themselves on these classes. At the very least you should use method swizzling, so you can call the original method (if it's implemented, which you'd have to test for).

emilienh commented 7 years ago

Thanks for your feedback.

aphexcx commented 7 years ago

Is the custom -awakeFromNib implementation only done for the context capture feature? In other words, if one doesn't use context capture, can one avoid the custom implementation?

emilienh commented 7 years ago

The custom implementation is needed for all features, sorry. By the way the latest version uses swizzling instead of category overload.

aphexcx commented 7 years ago

Whoa, thanks for making that change!

emilienh commented 7 years ago

No problem, thanks for pointing it out!