Commit 2e6e128c804376a6b2cd80e3244efb09b10ecd52

Authored by 张旭
1 parent 13173d1c

暂时把downView高度减少10 , 应对白条问题

metaCode/Classes/Main/HomePage/View/CNCustomIndexView.swift
... ... @@ -168,6 +168,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange
168 168 ///下滑显示的VIew
169 169 lazy var downSlideView: CNDownSlideView = {
170 170 let collectionView = CNDownSlideView.init(frame: CGRectMake(-25, 0, self.frame.size.width + 50, self.frame.size.height))
  171 + collectionView.backgroundColor = .clear
171 172 collectionView.backAction = {[weak self] in
172 173 self?.baseScrollView.setContentOffset(CGPoint(x: 0, y: (self!.baseScrollView.height)), animated: true)
173 174 self?.superScrollView?.isScrollEnabled = true
... ...
metaCode/Classes/Main/HomePage/View/CNDownSlideView.swift
... ... @@ -37,10 +37,13 @@ class CNDownSlideView:UIView{
37 37 }()
38 38  
39 39 //h5网页
  40 + // TODO: H:-10原为self.height-KTabBarHeight,但有白条,改成了-10
40 41 lazy var webView: WKWebView = {
41   - let webView = WKWebView.init(frame: CGRectMake(0, 0, self.width, self.height-KTabBarHeight))
  42 + let webView = WKWebView.init(frame: CGRectMake(0, 0, self.width, self.height-KTabBarHeight-10))
42 43 webView.scrollView.showsVerticalScrollIndicator = false
43 44 webView.scrollView.showsHorizontalScrollIndicator = false
  45 + webView.backgroundColor = .clear
  46 + webView.isOpaque = false
44 47 return webView
45 48 }()
46 49  
... ... @@ -51,7 +54,7 @@ class CNDownSlideView:UIView{
51 54 }
52 55 set{
53 56 _url = newValue!
54   -// _url = "https://www.baidu.com"
  57 + _url = "https://www.baidu.com"
55 58 if (_url != ""){
56 59 let webUrl: URL! = URL.init(string: _url!)
57 60 webView.load(URLRequest.init(url:webUrl))
... ... @@ -107,9 +110,10 @@ class CNDownSlideView:UIView{
107 110 ///初始化UI
108 111 func initUI(){
109 112 self.addSubview(self.contentView)
110   - self.addSubview(self.topView)
111   - self.addSubview(self.bottomView)
112 113 self.contentView.addSubview(self.webView)
  114 +// self.addSubview(self.topView)
  115 + self.addSubview(self.bottomView)
  116 +
113 117 }
114 118  
115 119 @objc func backBtnAction(){
... ...
metaCode/Classes/Main/HomePage/View/CNUpSlideView.swift
... ... @@ -15,6 +15,7 @@ class CNUpSlideView:UIView{
15 15 let webView = WKWebView.init(frame: CGRectMake(10, 20, self.width - 20, self.height - 20))
16 16 webView.scrollView.showsVerticalScrollIndicator = false
17 17 webView.scrollView.showsHorizontalScrollIndicator = false
  18 + webView.backgroundColor = .clear
18 19 return webView
19 20 }()
20 21  
... ...