I have two view controller. One scrollview for page control and one for detail (scroll vertical).
When i click status bar on iPhone the scrollToTop not working, and in iPad the scrollToTop is working.
I am sure that the scrollView.scrollToTop is YES. because i already print it.
Anyone know what cause the iPhone scrollToTop not working?
Thank you
Edit: I try by calling the scrollView delegate. in iPad this delegate its called. - (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView
in iPhone it is not called. I already use both contentScrollView.delegate = self; But the iphone not working :(
Edit: Try subclassing UIWindow (not working)
Window.h
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface Window : UIWindow
@end
Window.m
#import "Window.h"
@implementation Window
- (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
if ([event type] == UIEventTypeTouches && point.y < 250) {
//Send Your Notification Here
NSLog(@"KAROOO");
}
NSLog(@"HELLOWW");
return [super hitTest:point withEvent:event];
}
@end
AppDelegate.h
@property (nonatomic, strong) IBOutlet Window *window;
AppDelegate.m
@synthesize window = _window;