Hi, I am not able to find out why am I getting unnecessary warnings like: "Method 'someMethod' not found"? Though at run time it is executing this method and I am getting the desired results. FYI... The called method resides in separate class which i have already imported in my class.
A:
Then you have probably not put that method in the class' @interface. You should if it is a public method.
Being able to compile without warnings is a good thing.
St3fan
2010-09-30 20:57:38
Or if it isn't supposed to be API, add the declaration to a class continuation.
Graham Lee
2010-09-30 20:59:34
+1
A:
If you are trying to do something to an object, did you cast your object to the object's class?
If you are trying to access a method in your implementation of a class, do you have that method declared in your .h?
nacho3d
2010-09-30 20:59:32
+1
A:
Usually one of two reasons:
1) You haven't casted the object that you're calling that method on correctly.
[(UITableView*)myTableView setDelegate:self];
2) The method that you're calling may not be in your custom Class' (public) @interface
@interface MyCustomClass : NSObject {
}
- (void)doSomethingReallyImportant;
@end
christo16
2010-09-30 22:09:31
You are right. That was the mistake. Now, I have added this method to the protocol to which my class was bind to. Thank you so much.
Abhinav
2010-09-30 22:26:13