HI,
in my ViewController.m i´ve added a NSNotification in "viewDidLoad" like this:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(pageControlChanged:)
notificationName:@"ScrollViewDidEnd"
object:nil];
Then i´ve a custom scrollView-class "MyScrollView" where i can scroll an image. I´ve added a postNotification there, when the "scrollViewDidEndDecelerating:(UIScrollView *)scrollView{.." method is called.
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
[[NSNotificationCenter defaultCenter] postNotificationName:@"ScrollViewDidEnd" object:nil];
}
- (void) pageControlChanged:(NSNotification*)notification{
NSLog(@"pagecontrol: %@", notification);
}
When i compile my project, i get an error and the app crashes: Console-output: "No addObserver:selector:notifcatonName:object:" method found.
So, that´s my first NSNotification usage, would be great to get some help here. Thanks for your time. yosh