I want to do the following :
@interface UINavigationController ()
-(void)removeFromNavigationStack:(Class)aClass;
@end
and in .m file
@implementation UINavigationController
-(void)removeFromNavigationStack:(Class)aClass {
}
but in the .m file there are a lot of warning like “Method definition for ‘initWithRootViewController:’ not found”
how can I avoid this ? I’ve tried including but still have the warnings
Thanks
Since you’re dealing with
UINavigationController, a UIKit class, you probably want to go with a category, instead. Extensions need to be defined within the main@implementationblock of the class’s implementation, and you don’t have access to that forUINavigationControllerFrom the docs: