We have to set delegate of UiWebView scroll to call UiScrollView Method.
Let Start.
.h
#import <UIKit/UIKit.h>
#import "AsyncImageView.h"
@interface RSSDetailViewController : UIViewController <UIWebViewDelegate,UIScrollViewDelegate>
@property (nonatomic, retain) IBOutlet UIWebView *webViewLink;
@end
.m
@synthesize webViewLink;
- (void)viewDidLoad
{
[super viewDidLoad];
self.webViewLink.scrollView.delegate=self;
}
-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
NSLog(@"scrolling vertically; %f",scrollView.contentOffset.y);
if(scrollView.contentOffset.y> 52)
{
CGPoint offSet=scrollView.contentOffset;
offSet.y=52;
[scrollView setContentOffset:offSet];
}
}
IT will restrict the UiWebView scroll at point when it reach to 52
IT will restrict the UiWebView scroll at point when it reach to 52
No comments:
Post a Comment