My iPad universal app has a method I implemented from here:
http://stackoverflow.com/questions/2862140/best-way-to-programmatically-detect-ipad-iphone-hardware
-(BOOL)isPad
{
BOOL isPad;
NSRange range = [[[UIDevice currentDevice] model] rangeOfString:@"iPad"];
if(range.location==NSNotFound) isPad=NO;
else isPad=YES;
return isPad;
}
When I write my code like this:
if( [[[UIApplication sharedApplication] delegate] isPad] ) // do something
I get the warning:
'-isPad' not found in protocol
However, it's declared in my app delegate class:
-(BOOL)isPad;
And in the implementation (above).
Any ideas why this is?
Thanks in advance.