Commit 88571fd29e98933e55f53c8b4ca10c60f06ca97b
1 parent
50bb04a8
首页添加静态数据
Showing
6 changed files
with
16 additions
and
4 deletions
metaCode/Classes/Main/HomePage/View/CNMainView.swift
| ... | ... | @@ -51,9 +51,10 @@ class CNFrontMainView : UIView{ |
| 51 | 51 | contentView.clipsToBounds = true |
| 52 | 52 | contentView.layer.cornerRadius = 20 |
| 53 | 53 | |
| 54 | -// let imageView = UIImageView.init(frame: CGRect(x: 10, y: 10, width: contentView.width - 20, height: contentView.height - 20)) | |
| 55 | -// imageView.image = UIImage.init(named: "homePage_mainView_front"); | |
| 56 | -// contentView.addSubview(imageView) | |
| 54 | + let W = contentView.width - 40 | |
| 55 | + let imageView = UIImageView.init(frame: CGRect(x: 20, y: 25, width: W, height: W*0.63)) | |
| 56 | + imageView.image = UIImage.init(named: "homePage_mainView_front"); | |
| 57 | + contentView.addSubview(imageView) | |
| 57 | 58 | |
| 58 | 59 | return contentView |
| 59 | 60 | ... | ... |
metaCode/Classes/Main/HomePage/View/CNPayMoneyCodeView.swift
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | |
| 8 | 8 | import Foundation |
| 9 | 9 | import YYCategories |
| 10 | +import WebKit | |
| 10 | 11 | |
| 11 | 12 | ///付钱码view |
| 12 | 13 | class CNPayMoneyCodeView:UIView{ |
| ... | ... | @@ -26,6 +27,15 @@ class CNPayMoneyCodeView:UIView{ |
| 26 | 27 | self.clipsToBounds = true; |
| 27 | 28 | self.layer.cornerRadius = 20; |
| 28 | 29 | |
| 30 | + let webView:WKWebView = WKWebView.init(frame: CGRectMake(10, 20, self.width - 20, self.height - 20)) | |
| 31 | + let url: URL! = URL.init(string: "https://www.baidu.com") | |
| 32 | + webView.load(URLRequest.init(url:url)) | |
| 33 | + webView.scrollView.showsVerticalScrollIndicator = false | |
| 34 | + webView.scrollView.showsHorizontalScrollIndicator = false | |
| 35 | + | |
| 36 | + self.addSubview(webView) | |
| 37 | + | |
| 38 | + | |
| 29 | 39 | // let imageview : UIImageView = UIImageView.init(frame: CGRect(x: 20, y: 10, width: self.width - 40, height: self.height - 20)) |
| 30 | 40 | // imageview.image = UIImage(named: "homePage_payMoneyImage") |
| 31 | 41 | // | ... | ... |
metaCode/Supporting Files/Assets.xcassets/Home/homePage_mainView_front.imageset/4621683513846_.pic.jpg deleted
100644 → 0
56.9 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_mainView_front.imageset/Contents.json
metaCode/Supporting Files/Assets.xcassets/Home/homePage_mainView_front.imageset/证件@2x.png
0 → 100644
35.9 KB
metaCode/Supporting Files/Assets.xcassets/Home/homePage_mainView_front.imageset/证件@3x.png
0 → 100644
67.6 KB