ios - Xcode - warning "Method definition not found". Call Method from Category file -


i have created method in category file. want reuse methods in view controllers. have imported category file in view controllers , declared method in header file also. calling this:

category class:

@interface uiviewcontroller (headerview) -(uilabel *)somemethod;  @implementation uiviewcontroller (headerview) -(uilabel *)somemethod{ } 

homeviewcontroller:

@interface homeviewcontroller : uiviewcontroller -(uilabel *)somemethod;  @implementation homeviewcontroller [self somemethod]; 

iam getting warning message in line:

@implementation homeviewcontroller 

its working. want clear warning. how can it?

if want category in view controller that

your category

@interface uiviewcontroller (extendedmethods) - (void)somemethod; @end  @implementation uiviewcontroller (extendedmethods) - (void)somemethod {   nslog(@"some method"); } @end 

myviewcontroller.m

#import "myviewcontroller.h" #import "uiviewcontroller+extendedmethods.h"  @implementation myviewcontroller - (void)viewdidload {   [super viewdidload];   [self somemethod]; } @end 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -