-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning: Category is implementing a method which will also be implemented by its primary class #2
Comments
Hi No, this is not a problem, I sent several apps to the App Store with this code. Great to hear that you find the. Ode useful. Adam Sent from my iPad
|
According to Apple's document, you should subclass instead of using category when you have this warning. But if subclass, you can't apply the effect to every UIView. (Actually not every UIView works). |
Yes, Apple recommend not to use categories since it might cause problems On Mon, Apr 7, 2014 at 12:36 PM, bagusflyer [email protected]:
|
This seems to be broken in ios8 beta...the category layerclass is not being called. |
Thanks for the heads up. I'll make the adjustments. On Wed, Jun 18, 2014 at 12:38 AM, rbmanian75 [email protected]
|
Be careful with that category, because all views in your applications will be selective-border layered. This can lead to performance issues |
OK I can confirm that its not working in iOS8, any suggestions...? |
So I haven't been able to get this code to work so I looked into alternatives and came across this repo https://github.com/natrosoft/NAUIViewWithBorders. I think it really depends on what you are trying to do that will dictate if this works for you. Personally I had a view that had about 9 or 10 UILabels/UITextFields/UITextViews that were displaying content to the user. What I ended up doing is I used the NAUIViewWithBorders subclass on UIView and put all of my labels/textfields/textviews inside of their own UIView and made each UIView have a clear color background and just set the borders on those views. This does not crash in iOS8 and because it's not using a category it's not causing every view to be subjected to the new implementation. Hope this helps. If you need code samples as to what it looks like or any other help feel free to reach out. Happy Coding! |
Looks like +(Class) layerClass is not called for some views (specifically UILabel) on ios8. |
On iOS 8.4 it runs for me, however the warning (Category is implementing a method which will also be implemented by its primary class) still exists. Update: Since categories work backwards to migrate the method I am not sure my last statement is still valid. |
Hi, first of all thank you for your project. It's really handy.
I get this Warning: "Category is implementing a method which will also be implemented by its primary class" and it's related to the code:
at line 29 in UIView+AUISelectiveBorder.m.
Do you think this could be a problem for App Store submission?
The text was updated successfully, but these errors were encountered: