当有导航控制器时,系统会默认将第一个添加的scrollView或其子类视图的内容下移64个像素,解决办法:
self.automaticallyAdjustsScrollViewInsets = NO;// 自动滚动调整,默认为YES//可以避免-系统自动设置从高64的位置开始
加载h5页面
UIWebView* web = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height-64)];
NSString* htmlPath = [[NSBundle mainBundle]pathForResource:@"sixOfNineteen" ofType:@"html"];
[web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:htmlPath]]];
[self.view addSubview:web];