Commit 10d1b2721586f7a2cd24f882568b52af0e4ed44d
1 parent
b4536405
Exists in
parentassistant
添加报告页面左右按钮
Showing
7 changed files
with
84 additions
and
18 deletions
 
Show diff stats
ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
ParentAssistant/ParentAssistant/Classes/controllers/report/ReportViewController.swift
| ... | ... | @@ -47,30 +47,54 @@ class ReportViewController: UIViewController { | 
| 47 | 47 | self.navigationController?.navigationBar.barStyle = UIBarStyle.default// UIColorFromRGB(0xC5DAFF) | 
| 48 | 48 | let backImage = UIImage(named: "navigationBar_backgrounImage") | 
| 49 | 49 | self.navigationController?.navigationBar.setBackgroundImage(backImage, for: UIBarMetrics.default) | 
| 50 | + | |
| 50 | 51 | self.configTheme() | 
| 51 | -// self.navigationItem.title = "报告" | |
| 52 | + | |
| 52 | 53 | setuptitleView() | 
| 53 | 54 | |
| 54 | 55 | } | 
| 55 | 56 | func setuptitleView(){ | 
| 56 | 57 | |
| 58 | + //左按钮 | |
| 59 | + let leftView = UIButton.init(frame: CGRect.init(x: 0, y: 0, width: 80, height: 44)) | |
| 60 | + let titleLab = UILabel.init(frame: CGRect.init(x: 0, y: 0, width: 60, height: 44)) | |
| 61 | + if AccountManager.shared.isOnline() { | |
| 62 | + if AccountManager.shared.rawUserInfo!.contentData()["studentClass"].arrayValue.count == 0 { | |
| 63 | + titleLab.text = "未绑定" | |
| 64 | + }else{ | |
| 65 | + titleLab.text = AccountManager.shared.rawUserInfo!.contentData()["studentClass"][0]["studentName"].stringValue | |
| 66 | + } | |
| 67 | + }else{ | |
| 68 | + titleLab.text = "未登录" | |
| 69 | + } | |
| 70 | + leftView.addSubview(titleLab) | |
| 57 | 71 | |
| 58 | -// // MARK: - 设置顶部的titleView | |
| 59 | -// titleView = Bundle.main.loadNibNamed("ReportHeaderView", owner: nil, options: nil)![0] as! ReportHeaderView | |
| 60 | -//// titleView.delegate = self | |
| 61 | -// titleView.frame = CGRect(x: 0, y: 0, width: screenWidth, height: 44) | |
| 62 | -// self.navigationItem.titleView = titleView | |
| 63 | -// titleView.layoutSubviews() | |
| 64 | -// //navigation左上角显示名称 家长未绑定孩子 | |
| 65 | -// if AccountManager.shared.isOnline() { | |
| 66 | -// if AccountManager.shared.rawUserInfo!.contentData()["studentClass"].arrayValue.count == 0 { | |
| 67 | -// titleView.nameButton.setTitle("未绑定", for: UIControlState.normal) | |
| 68 | -// }else{ | |
| 69 | -// titleView.nameButton.setTitle(AccountManager.shared.rawUserInfo!.contentData()["studentClass"][0]["studentName"].stringValue, for: UIControlState.normal) | |
| 70 | -// } | |
| 71 | -// }else{ | |
| 72 | -// titleView.nameButton.setTitle("未登录", for: UIControlState.normal) | |
| 73 | -// } | |
| 72 | + let imageView = UIImageView.init(frame: CGRect.init(x: 60, y: 11, width: 20, height: 22)) | |
| 73 | + imageView.image = UIImage.init(named: "report_pull") | |
| 74 | + imageView.contentMode = .scaleAspectFit | |
| 75 | + leftView.addSubview(imageView) | |
| 76 | + | |
| 77 | + leftView.addTarget(self, action: #selector(showView), for: UIControlEvents.touchDown) | |
| 78 | + | |
| 79 | + let leftBtn = UIBarButtonItem.init(customView: leftView) | |
| 80 | + self.navigationItem.leftBarButtonItem = leftBtn | |
| 81 | + | |
| 82 | + //右按钮 | |
| 83 | + let rightView = UIButton.init(frame: CGRect.init(x: 0, y: 0, width: 80, height: 44)) | |
| 84 | + let titleRLab = UILabel.init(frame: CGRect.init(x: 0, y: 0, width: 50, height: 44)) | |
| 85 | + titleRLab.text = "筛选" | |
| 86 | + titleRLab.textAlignment = .right | |
| 87 | + rightView.addSubview(titleRLab) | |
| 88 | + | |
| 89 | + let imageRView = UIImageView.init(frame: CGRect.init(x: 60, y: 11, width: 20, height: 22)) | |
| 90 | + imageRView.image = UIImage.init(named: "report_select") | |
| 91 | + imageRView.contentMode = .scaleAspectFit | |
| 92 | + rightView.addSubview(imageRView) | |
| 93 | + | |
| 94 | + rightView.addTarget(self, action: #selector(showView), for: UIControlEvents.touchDown) | |
| 95 | + let rightBtn = UIBarButtonItem.init(customView: rightView) | |
| 96 | + self.navigationItem.rightBarButtonItem = rightBtn | |
| 97 | + | |
| 74 | 98 | } | 
| 75 | 99 | // MARK: - 设置日期页面 | 
| 76 | 100 | func setupDateView(){ | ... | ... | 
ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/report_pull.imageset/Contents.json
0 → 100644
| ... | ... | @@ -0,0 +1,21 @@ | 
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "idiom" : "universal", | |
| 9 | + "filename" : "report_pull@2x.png", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "version" : 1, | |
| 19 | + "author" : "xcode" | |
| 20 | + } | |
| 21 | +} | |
| 0 | 22 | \ No newline at end of file | ... | ... | 
ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/report_pull.imageset/report_pull@2x.png
0 → 100644
1.43 KB
ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/report_select.imageset/Contents.json
0 → 100644
| ... | ... | @@ -0,0 +1,21 @@ | 
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "idiom" : "universal", | |
| 9 | + "filename" : "report_select@2x.png", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "idiom" : "universal", | |
| 14 | + "scale" : "3x" | |
| 15 | + } | |
| 16 | + ], | |
| 17 | + "info" : { | |
| 18 | + "version" : 1, | |
| 19 | + "author" : "xcode" | |
| 20 | + } | |
| 21 | +} | |
| 0 | 22 | \ No newline at end of file | ... | ... | 
ParentAssistant/ParentAssistant/Supporting Files/Assets.xcassets/report/report_select.imageset/report_select@2x.png
0 → 100644
1.21 KB
ParentAssistant/ParentAssistant/Supporting Files/Base.lproj/Main.storyboard
| ... | ... | @@ -2030,7 +2030,7 @@ | 
| 2030 | 2030 | <image name="Information_bar_icon_select" width="22" height="20"/> | 
| 2031 | 2031 | <image name="evaluation_bar_icon" width="22" height="21"/> | 
| 2032 | 2032 | <image name="evaluation_bar_icon_select" width="22" height="21"/> | 
| 2033 | - <image name="evaluation_icon_activite2" width="200" height="100"/> | |
| 2033 | + <image name="evaluation_icon_activite3" width="200" height="100"/> | |
| 2034 | 2034 | <image name="evaluation_icon_camera" width="32" height="32"/> | 
| 2035 | 2035 | <image name="evaluation_icon_detection_back" width="150" height="140"/> | 
| 2036 | 2036 | <image name="evaluation_icon_learningManagement" width="45" height="47"/> | ... | ... |