使用UIWebView和标签滚动视图

时间:2015-10-16 13:06:25

标签: ios swift uiscrollview uiwebview

我有一个带有标签的UIWebView(见图片),但是当我向下滚动时,标签就会保持原位并且网页视图向下滚动。如何让一切动作向下滚动?

        self.editorialDetailWebView.loadHTMLString(editorialArticleContentThroughSegue!, baseURL: nil)
    self.editorialDetailWebView.sizeToFit()

    self.editorialDetailScrollView.addSubview(editorialDetailWebView)
    self.editorialDetailScrollView.addSubview(editorialDetailHeadlineLabel)
    self.editorialDetailScrollView.addSubview(editorialDetailAuthorLabel)
    self.editorialDetailScrollView.addSubview(editorialDetailPublishDateLabel)
    self.editorialDetailScrollView.addSubview(editorialDetailVolumeAndIssueLabel)

    let webViewHeight = self.editorialDetailWebView.scrollView.bounds.height
    let webViewWidth = self.editorialDetailWebView.scrollView.bounds.width

}

override func viewDidLayoutSubviews() {
    super.viewDidLayoutSubviews()

    editorialDetailScrollView.contentSize = CGSize(width: self.view.frame.size.width, height: self.view.frame.size.height * 2.0)

}

我现在的问题截图:

Part 1

Part 2

1 个答案:

答案 0 :(得分:0)

将您的观点添加到webview的滚动视图

PIMAGE_DOS_HEADER dos_header = (PIMAGE_DOS_HEADER)PE_Header;
PIMAGE_NT_HEADERS32 ntHeader = (PIMAGE_NT_HEADERS32)(PE_Header + dos_header->e_lfanew);

// how to go on?