【发布时间】:2012-06-21 02:43:38
【问题描述】:
我在视图控制器中添加了 webview 和导航栏。 Web 视图显示正确,但是当我开始垂直拖动该 webview 并停止拖动时,uiwebview 到达顶部。 简而言之,滚动不能垂直工作。 这是我的代码。
- (void)viewDidLoad
{
[super viewDidLoad];
web.delegate=self;
NSBundle *myAppBundle = [NSBundle bundleForClass:[self class]];
NSString *htmlFilePath = [myAppBundle pathForResource:@"infotext" ofType:@"htm"];
[web loadHTMLString:htmlFilePath baseURL:nil];
[self.view addSubview:web];
}
在这里,我在 IB 中获取 webview 并将其设置为出口。
【问题讨论】:
标签: objective-c xcode uiviewcontroller uiwebview uiscrollview