From class picViewController i am calling function imageCliked on scrollViewController in order to fire function loadPage but it does work. Compiler error:
"Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[scrollViewController loadpage:]: unrecognized selector sent to class 0x17198'"
Anybody can help?
@interface scrollViewController : UIViewController <UIScrollViewDelegate> {
}
- (void)loadPage:(int)page; // loads a new picViewController
+(void) imageCliked;
@end
#import "scrollViewController.h"
#import "picViewController.h"
#import "MLUtils.h"
@implementation scrollViewController
- (void)loadPage:(int)page {
// I need to call this function from +(void) imageCliked
}
/* this function is called by picViewController pressButton1 */
+(void) imageCliked {
NSLog(@"left");
[self loadPage:3];// does not work
}
@end
#import "picViewController.h"
#import "scrollViewController.h"
@implementation picViewController
- (void) pressButton1:(id)sender{
[scrollViewController imageCliked];
}
@end