CNUpSlideView.swift 1.22 KB
//
//  CNUpSlideView.swift
//  metaCode
//
//  Created by daojian on 2023/5/31.
//

import Foundation
import YYCategories
import WebKit

///上滑显示的VIew
class CNUpSlideView:UIView{
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.initUI()
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func initUI()
    {
        self.backgroundColor = UIColor.white;
        self.clipsToBounds = true;
        self.layer.cornerRadius = 20;
        
        let webView:WKWebView = WKWebView.init(frame: CGRectMake(10, 20, self.width - 20, self.height - 20))
        let url: URL! = URL.init(string: "https://www.baidu.com")
        webView.load(URLRequest.init(url:url))
        webView.scrollView.showsVerticalScrollIndicator = false
        webView.scrollView.showsHorizontalScrollIndicator = false
        
        self.addSubview(webView)
        
        
//        let imageview : UIImageView = UIImageView.init(frame: CGRect(x: 20, y: 10, width: self.width - 40, height: self.height - 20))
//        imageview.image = UIImage(named: "homePage_payMoneyImage")
//        
//        self.addSubview(imageview)
        
    }
    
}