tags:

views:

33

answers:

1

when iam trying to call

rootviewcontroller *rootview=[rootviewcontroller alloc];
[rootview methodname];

is showing warning "root view controller may not respond"

A: 

It means that "methodname" is not a "public" (*) method of your rootviewcontroller class.

You need something like

@interface rootviewcontroller : baseclass {
  - (void) methodname;
}

At the moment, while rootviewcontroller might respond to the message called "methodname", the compiler can't see that it does (because you've not told it so through the above).

(*) Objective-C methods are all public in way C++/Java people would understand the term. I suppose I should really say "is not a method declared in the @interface of the class".

Frank Shearar