Commit 61bbbf6b1fea11298587f482ed5538c8d29dbcd8
1 parent
116cc992
提交空白占位图
Showing
14 changed files
with
157 additions
and
85 deletions
Podfile
metaCode.xcodeproj/project.pbxproj
| ... | ... | @@ -23,7 +23,6 @@ |
| 23 | 23 | 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A3F2A2F055100B5F8CF /* CNLiveConfigUserInfo.swift */; }; |
| 24 | 24 | 79282A442A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A432A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift */; }; |
| 25 | 25 | 79282A462A2F457D00B5F8CF /* CNLiveMineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A452A2F457D00B5F8CF /* CNLiveMineViewController.swift */; }; |
| 26 | - 792E57D72A3AA2AC005834DB /* CNLiveCommonJsonUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792E57D62A3AA2AC005834DB /* CNLiveCommonJsonUtil.swift */; }; | |
| 27 | 26 | 792E57D92A3AA2F2005834DB /* CNLiveCommonBaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792E57D82A3AA2F2005834DB /* CNLiveCommonBaseModel.swift */; }; |
| 28 | 27 | 792E57DB2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */; }; |
| 29 | 28 | 79396EED2A319F220053E1AF /* NSObject+CNLiveCurrentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79396EEC2A319F220053E1AF /* NSObject+CNLiveCurrentVC.swift */; }; |
| ... | ... | @@ -44,6 +43,7 @@ |
| 44 | 43 | 798A44FF2A30A0A800815935 /* CNLiveInputFeedBackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798A44FE2A30A0A800815935 /* CNLiveInputFeedBackViewController.swift */; }; |
| 45 | 44 | 79A68C4A2A26E6CE00DC3B43 /* (null) in Sources */ = {isa = PBXBuildFile; }; |
| 46 | 45 | 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */ = {isa = PBXBuildFile; }; |
| 46 | + 79BDDCBE2A3C3FC8008560FC /* NSObject+CNLiveJSONTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79BDDCBD2A3C3FC8008560FC /* NSObject+CNLiveJSONTool.swift */; }; | |
| 47 | 47 | 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79F4B1152A32B96B00993C03 /* CNLiveMineInfoViewController.swift */; }; |
| 48 | 48 | 79F4B11A2A32F21400993C03 /* CNLiveMineNickViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79F4B1192A32F21400993C03 /* CNLiveMineNickViewController.swift */; }; |
| 49 | 49 | 79F4B11C2A33036E00993C03 /* CNLiveMineInfoAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79F4B11B2A33036E00993C03 /* CNLiveMineInfoAlertView.swift */; }; |
| ... | ... | @@ -114,7 +114,6 @@ |
| 114 | 114 | 79282A3F2A2F055100B5F8CF /* CNLiveConfigUserInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigUserInfo.swift; sourceTree = "<group>"; }; |
| 115 | 115 | 79282A432A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginAuthView.swift; sourceTree = "<group>"; }; |
| 116 | 116 | 79282A452A2F457D00B5F8CF /* CNLiveMineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineViewController.swift; sourceTree = "<group>"; }; |
| 117 | - 792E57D62A3AA2AC005834DB /* CNLiveCommonJsonUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCommonJsonUtil.swift; sourceTree = "<group>"; }; | |
| 118 | 117 | 792E57D82A3AA2F2005834DB /* CNLiveCommonBaseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCommonBaseModel.swift; sourceTree = "<group>"; }; |
| 119 | 118 | 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCommonQiniuTool.swift; sourceTree = "<group>"; }; |
| 120 | 119 | 79396EEC2A319F220053E1AF /* NSObject+CNLiveCurrentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+CNLiveCurrentVC.swift"; sourceTree = "<group>"; }; |
| ... | ... | @@ -134,6 +133,7 @@ |
| 134 | 133 | 798A44FC2A309EBA00815935 /* CNLiveTypeFeedBackViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveTypeFeedBackViewController.swift; sourceTree = "<group>"; }; |
| 135 | 134 | 798A44FE2A30A0A800815935 /* CNLiveInputFeedBackViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveInputFeedBackViewController.swift; sourceTree = "<group>"; }; |
| 136 | 135 | 79A68C512A26F59C00DC3B43 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = metaCode/Info.plist; sourceTree = "<group>"; }; |
| 136 | + 79BDDCBD2A3C3FC8008560FC /* NSObject+CNLiveJSONTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+CNLiveJSONTool.swift"; sourceTree = "<group>"; }; | |
| 137 | 137 | 79F4B1152A32B96B00993C03 /* CNLiveMineInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineInfoViewController.swift; sourceTree = "<group>"; }; |
| 138 | 138 | 79F4B1192A32F21400993C03 /* CNLiveMineNickViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineNickViewController.swift; sourceTree = "<group>"; }; |
| 139 | 139 | 79F4B11B2A33036E00993C03 /* CNLiveMineInfoAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineInfoAlertView.swift; sourceTree = "<group>"; }; |
| ... | ... | @@ -225,6 +225,7 @@ |
| 225 | 225 | 79282A3B2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift */, |
| 226 | 226 | 798A44EF2A305BC200815935 /* UIButton+CNLiveExtension.swift */, |
| 227 | 227 | 79396EEC2A319F220053E1AF /* NSObject+CNLiveCurrentVC.swift */, |
| 228 | + 79BDDCBD2A3C3FC8008560FC /* NSObject+CNLiveJSONTool.swift */, | |
| 228 | 229 | ); |
| 229 | 230 | path = Extensions; |
| 230 | 231 | sourceTree = "<group>"; |
| ... | ... | @@ -300,7 +301,6 @@ |
| 300 | 301 | 792E57D52A3AA28E005834DB /* Util */ = { |
| 301 | 302 | isa = PBXGroup; |
| 302 | 303 | children = ( |
| 303 | - 792E57D62A3AA2AC005834DB /* CNLiveCommonJsonUtil.swift */, | |
| 304 | 304 | 792E57D82A3AA2F2005834DB /* CNLiveCommonBaseModel.swift */, |
| 305 | 305 | 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */, |
| 306 | 306 | ); |
| ... | ... | @@ -815,8 +815,8 @@ |
| 815 | 815 | 7CD675522A29C04B008354C1 /* CNLiveConstant.swift in Sources */, |
| 816 | 816 | 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */, |
| 817 | 817 | 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */, |
| 818 | - 7CD6753E2A2740B0008354C1 /* CNPayMoneyCodeView.swift in Sources */, | |
| 819 | - 7CD675402A2740B0008354C1 /* CNCollectMoneyCodeView.swift in Sources */, | |
| 818 | + 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */, | |
| 819 | + 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */, | |
| 820 | 820 | 792E57D92A3AA2F2005834DB /* CNLiveCommonBaseModel.swift in Sources */, |
| 821 | 821 | 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */, |
| 822 | 822 | 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */, |
| ... | ... | @@ -829,7 +829,7 @@ |
| 829 | 829 | 798A44FF2A30A0A800815935 /* CNLiveInputFeedBackViewController.swift in Sources */, |
| 830 | 830 | 79282A442A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift in Sources */, |
| 831 | 831 | 7C2703302A36CBE30061EC50 /* CNCertificationView.swift in Sources */, |
| 832 | - 792E57D72A3AA2AC005834DB /* CNLiveCommonJsonUtil.swift in Sources */, | |
| 832 | + 79BDDCBE2A3C3FC8008560FC /* NSObject+CNLiveJSONTool.swift in Sources */, | |
| 833 | 833 | 790D01A32A2DDBA300C5978D /* CNLiveConfigManager.swift in Sources */, |
| 834 | 834 | 7C2703332A36CC660061EC50 /* CNLiveGlobalBlock.swift in Sources */, |
| 835 | 835 | 798A44EA2A30135D00815935 /* CNLiveMineBodyListView.swift in Sources */, | ... | ... |
metaCode/Classes/Config/CNLiveConfigUserInfo.swift
| ... | ... | @@ -101,7 +101,7 @@ class UserInfoManager: NSObject { |
| 101 | 101 | print("获取用户信息失败") |
| 102 | 102 | return UserInfoModel() |
| 103 | 103 | } |
| 104 | - let userInfo = JsonUtil.jsonToModel(user_info as! String, UserInfoModel.self) as! UserInfoModel | |
| 104 | + let userInfo = jsonToModel(user_info as! String, UserInfoModel.self) as! UserInfoModel | |
| 105 | 105 | UserInfoManager.shared._userInfo = userInfo |
| 106 | 106 | return userInfo |
| 107 | 107 | } | ... | ... |
metaCode/Classes/Common/Util/CNLiveCommonJsonUtil.swift renamed to metaCode/Classes/Extensions/NSObject+CNLiveJSONTool.swift
| 1 | 1 | // |
| 2 | -// CNLiveCommonJsonUtil.swift | |
| 2 | +// NSObject+CNLiveJSONTool.swift | |
| 3 | 3 | // metaCode |
| 4 | 4 | // |
| 5 | -// Created by open on 2023/6/15. | |
| 5 | +// Created by open on 2023/6/16. | |
| 6 | 6 | // |
| 7 | 7 | |
| 8 | 8 | import Foundation |
| 9 | - | |
| 10 | -import UIKit | |
| 11 | 9 | import HandyJSON |
| 12 | 10 | |
| 13 | -class JsonUtil: NSObject { | |
| 14 | - /** | |
| 15 | - * Json转对象 | |
| 16 | - */ | |
| 17 | - static func jsonToModel(_ jsonStr:String,_ modelType:HandyJSON.Type) -> BaseModel { | |
| 18 | - if jsonStr == "" || jsonStr.count == 0 { | |
| 19 | - #if DEBUG | |
| 20 | - print("jsonoModel:字符串为空") | |
| 21 | - #endif | |
| 22 | - return BaseModel() | |
| 23 | - } | |
| 24 | - return modelType.deserialize(from: jsonStr) as! BaseModel | |
| 25 | - | |
| 26 | - } | |
| 27 | - | |
| 28 | - /** | |
| 29 | - * Json转数组对象 | |
| 30 | - */ | |
| 31 | - static func jsonArrayToModel(_ jsonArrayStr:String, _ modelType:HandyJSON.Type) ->[BaseModel] { | |
| 32 | - if jsonArrayStr == "" || jsonArrayStr.count == 0 { | |
| 33 | - #if DEBUG | |
| 34 | - print("jsonToModelArray:字符串为空") | |
| 35 | - #endif | |
| 36 | - return [] | |
| 37 | - } | |
| 38 | - var modelArray:[BaseModel] = [] | |
| 39 | - let data = jsonArrayStr.data(using: String.Encoding.utf8) | |
| 40 | - let peoplesArray = try! JSONSerialization.jsonObject(with:data!, options: JSONSerialization.ReadingOptions()) as? [AnyObject] | |
| 41 | - for people in peoplesArray! { | |
| 42 | - modelArray.append(dictionaryToModel(people as! [String : Any], modelType)) | |
| 43 | - } | |
| 44 | - return modelArray | |
| 11 | +/** | |
| 12 | + * Json转对象 | |
| 13 | + */ | |
| 14 | +func jsonToModel(_ jsonStr:String,_ modelType:HandyJSON.Type) -> BaseModel { | |
| 15 | + if jsonStr == "" || jsonStr.count == 0 { | |
| 16 | + #if DEBUG | |
| 17 | + print("jsonoModel:字符串为空") | |
| 18 | + #endif | |
| 19 | + return BaseModel() | |
| 20 | + } | |
| 21 | + return modelType.deserialize(from: jsonStr) as! BaseModel | |
| 22 | +} | |
| 45 | 23 | |
| 46 | - } | |
| 24 | +/** | |
| 25 | + * Json转数组对象 | |
| 26 | + */ | |
| 27 | +func jsonArrayToModel(_ jsonArrayStr:String, _ modelType:HandyJSON.Type) ->[BaseModel] { | |
| 28 | + if jsonArrayStr == "" || jsonArrayStr.count == 0 { | |
| 29 | + #if DEBUG | |
| 30 | + print("jsonToModelArray:字符串为空") | |
| 31 | + #endif | |
| 32 | + return [] | |
| 33 | + } | |
| 34 | + var modelArray:[BaseModel] = [] | |
| 35 | + let data = jsonArrayStr.data(using: String.Encoding.utf8) | |
| 36 | + let peoplesArray = try! JSONSerialization.jsonObject(with:data!, options: JSONSerialization.ReadingOptions()) as? [AnyObject] | |
| 37 | + for people in peoplesArray! { | |
| 38 | + modelArray.append(dictionaryToModel(people as! [String : Any], modelType)) | |
| 39 | + } | |
| 40 | + return modelArray | |
| 47 | 41 | |
| 48 | - /** | |
| 49 | - * 字典转对象 | |
| 50 | - */ | |
| 51 | - static func dictionaryToModel(_ dictionStr:[String:Any],_ modelType:HandyJSON.Type) -> BaseModel { | |
| 52 | - if dictionStr.count == 0 { | |
| 53 | - #if DEBUG | |
| 54 | - print("dictionaryToModel:字符串为空") | |
| 55 | - #endif | |
| 56 | - return BaseModel() | |
| 57 | - } | |
| 58 | - return modelType.deserialize(from: dictionStr) as! BaseModel | |
| 59 | - } | |
| 42 | +} | |
| 43 | +/** | |
| 44 | + * 字典转对象 | |
| 45 | + */ | |
| 46 | +func dictionaryToModel(_ dictionStr:[String:Any],_ modelType:HandyJSON.Type) -> BaseModel { | |
| 47 | + if dictionStr.count == 0 { | |
| 48 | + #if DEBUG | |
| 49 | + print("dictionaryToModel:字符串为空") | |
| 50 | + #endif | |
| 51 | + return BaseModel() | |
| 52 | + } | |
| 53 | + return modelType.deserialize(from: dictionStr) as! BaseModel | |
| 54 | +} | |
| 60 | 55 | |
| 61 | - /** | |
| 62 | - * 对象转JSON | |
| 63 | - */ | |
| 64 | - static func modelToJson(_ model:BaseModel?) -> String { | |
| 65 | - if model == nil { | |
| 66 | - #if DEBUG | |
| 67 | - print("modelToJson:model为空") | |
| 68 | - #endif | |
| 69 | - return "" | |
| 70 | - } | |
| 71 | - return (model?.toJSONString())! | |
| 72 | - } | |
| 56 | +/** | |
| 57 | + * 对象转JSON | |
| 58 | + */ | |
| 59 | +func modelToJson(_ model:BaseModel?) -> String { | |
| 60 | + if model == nil { | |
| 61 | + #if DEBUG | |
| 62 | + print("modelToJson:model为空") | |
| 63 | + #endif | |
| 64 | + return "" | |
| 65 | + } | |
| 66 | + return (model?.toJSONString())! | |
| 67 | +} | |
| 73 | 68 | |
| 74 | - /** | |
| 75 | - * 对象转字典 | |
| 76 | - */ | |
| 77 | - static func modelToDictionary(_ model:BaseModel?) -> [String:Any] { | |
| 78 | - if model == nil { | |
| 79 | - #if DEBUG | |
| 80 | - print("modelToJson:model为空") | |
| 81 | - #endif | |
| 82 | - return [:] | |
| 83 | - } | |
| 84 | - return (model?.toJSON())! | |
| 85 | - } | |
| 69 | +/** | |
| 70 | + * 对象转字典 | |
| 71 | + */ | |
| 72 | +func modelToDictionary(_ model:BaseModel?) -> [String:Any] { | |
| 73 | + if model == nil { | |
| 74 | + #if DEBUG | |
| 75 | + print("modelToJson:model为空") | |
| 76 | + #endif | |
| 77 | + return [:] | |
| 78 | + } | |
| 79 | + return (model?.toJSON())! | |
| 86 | 80 | } | ... | ... |
metaCode/Classes/Main/LoginPage/ViewModel/CNLiveLoginViewModel.swift
| ... | ... | @@ -91,7 +91,7 @@ class CNLiveLoginViewModel : NSObject { |
| 91 | 91 | if resp.allKeys.contains(where: { item in |
| 92 | 92 | return item as! String == "data" |
| 93 | 93 | }) { |
| 94 | - let userInfoModel = JsonUtil.dictionaryToModel(resp["data"] as! [String : Any], UserInfoModel.self) | |
| 94 | + let userInfoModel = dictionaryToModel(resp["data"] as! [String : Any], UserInfoModel.self) | |
| 95 | 95 | UserInfoManager.cacheUserInfo(userInfo: userInfoModel as! UserInfoModel) |
| 96 | 96 | UserDefaults.standard.set(true,forKey: "is_login") |
| 97 | 97 | resultBlock() | ... | ... |
metaCode/Classes/Main/MinePage/Controller/CNLiveInputFeedBackViewController.swift
| ... | ... | @@ -61,6 +61,8 @@ class CNLiveInputFeedBackViewController: CNLiveBaseViewController, UITextViewDel |
| 61 | 61 | lazy var photoView: MinePhotoUploadView = { |
| 62 | 62 | let pView = MinePhotoUploadView.init(frame: .zero) { [self] index in |
| 63 | 63 | let mString = NSMutableAttributedString(string: "上传截图 (选填 \(index)/3)") |
| 64 | + mString.addAttributes([.foregroundColor: UIColor.black,.font: BoldFont_18], range: NSRange(location: 0, length: 4)) | |
| 65 | + mString.addAttributes([.foregroundColor: HexColor("#B4B4B4")!,.font: Font_14], range: NSRange(location: 4, length: 9)) | |
| 64 | 66 | photoLabel.attributedText = mString |
| 65 | 67 | } |
| 66 | 68 | pView.backgroundColor = .clear | ... | ... |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineAddInfoViewController.swift
| ... | ... | @@ -6,6 +6,7 @@ |
| 6 | 6 | // |
| 7 | 7 | |
| 8 | 8 | import Foundation |
| 9 | +import DZNEmptyDataSet | |
| 9 | 10 | |
| 10 | 11 | enum CNLiveMineInfoShowType { |
| 11 | 12 | case add//添加身份 |
| ... | ... | @@ -13,7 +14,7 @@ enum CNLiveMineInfoShowType { |
| 13 | 14 | case message//消息中心 |
| 14 | 15 | } |
| 15 | 16 | |
| 16 | -class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, UITableViewDragDelegate, UITableViewDropDelegate { | |
| 17 | +class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, UITableViewDragDelegate, UITableViewDropDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate{ | |
| 17 | 18 | |
| 18 | 19 | let kCNLiveMineInfoLListTableViewIdentifier = "kCNLiveMineInfoLListTableViewIdentifier" |
| 19 | 20 | let kCNLiveMineStandInfoTableViewIdentifier = "kCNLiveMineStandInfoTableViewIdentifier" |
| ... | ... | @@ -23,6 +24,8 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel |
| 23 | 24 | tableView.dataSource = self |
| 24 | 25 | tableView.dragDelegate = self |
| 25 | 26 | tableView.dropDelegate = self |
| 27 | + tableView.emptyDataSetSource = self | |
| 28 | + tableView.emptyDataSetDelegate = self | |
| 26 | 29 | tableView.backgroundColor = HexColor("#F7F8FA") |
| 27 | 30 | tableView.tableFooterView = UIView.init() |
| 28 | 31 | tableView.rowHeight = 100 |
| ... | ... | @@ -44,8 +47,8 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel |
| 44 | 47 | dataArray.add(["image":"mine_header_icon_defult_ava","name":"退伍军人身份","number":"证件编号:410800111127954"]) |
| 45 | 48 | } |
| 46 | 49 | if _show_type == .message { |
| 47 | - dataArray.add(["image":"mine_header_icon_defult_ava","name":"志愿者云","number":"志愿者大礼包发放中,快来领取吧!","time":"03-12"]) | |
| 48 | - dataArray.add(["image":"mine_header_icon_defult_ava","name":"志愿者·志愿云","number":"志愿者大礼包快来领取吧~","time":"03-12"]) | |
| 50 | +// dataArray.add(["image":"mine_header_icon_defult_ava","name":"志愿者云","number":"志愿者大礼包发放中,快来领取吧!","time":"03-12"]) | |
| 51 | +// dataArray.add(["image":"mine_header_icon_defult_ava","name":"志愿者·志愿云","number":"志愿者大礼包快来领取吧~","time":"03-12"]) | |
| 49 | 52 | } |
| 50 | 53 | return dataArray |
| 51 | 54 | }() |
| ... | ... | @@ -113,6 +116,28 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel |
| 113 | 116 | } |
| 114 | 117 | |
| 115 | 118 | extension CNLiveMineAddInfoViewController { |
| 119 | + func image(forEmptyDataSet scrollView: UIScrollView!) -> UIImage! { | |
| 120 | + return UIImage(named: "mine_list_source_empty") | |
| 121 | + } | |
| 122 | + | |
| 123 | + func title(forEmptyDataSet scrollView: UIScrollView!) -> NSAttributedString! { | |
| 124 | + var defult_string = "" | |
| 125 | + switch _show_type { | |
| 126 | + case .add: | |
| 127 | + defult_string = "暂时没有可添加的身份~" | |
| 128 | + case .info: | |
| 129 | + defult_string = "暂时没有身份信息~" | |
| 130 | + case .message: | |
| 131 | + defult_string = "暂时没有可读的消息~" | |
| 132 | + case .none: | |
| 133 | + break | |
| 134 | + } | |
| 135 | + return NSAttributedString(string: defult_string, attributes: [.font: Font_17,.foregroundColor: HexColor("#666666")!]) | |
| 136 | + } | |
| 137 | + | |
| 138 | +} | |
| 139 | + | |
| 140 | +extension CNLiveMineAddInfoViewController { | |
| 116 | 141 | |
| 117 | 142 | func numberOfSections(in tableView: UITableView) -> Int { |
| 118 | 143 | return 1 | ... | ... |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineInfoViewController.swift
| ... | ... | @@ -72,6 +72,12 @@ class CNLiveMineInfoViewController: CNLiveBaseViewController, PhotoPickerControl |
| 72 | 72 | super.viewDidLoad() |
| 73 | 73 | view.backgroundColor = .black |
| 74 | 74 | setNeedsStatusBarAppearanceUpdate() |
| 75 | + navigationBarHidden = false | |
| 76 | + topNavView.backgroundColor = .clear | |
| 77 | + //先设置一个默认返回按钮 | |
| 78 | + let leftBtn_array : Array<UIButton> = [UIButton.backItem(imageName: "mine_header_icon_white_back", target: self, action: #selector(changeCancelAction))] | |
| 79 | + leftNavBtns = leftBtn_array | |
| 80 | + | |
| 75 | 81 | |
| 76 | 82 | view.addSubview(imageView) |
| 77 | 83 | imageView.snp.makeConstraints { make in |
| ... | ... | @@ -109,7 +115,6 @@ class CNLiveMineInfoViewController: CNLiveBaseViewController, PhotoPickerControl |
| 109 | 115 | } |
| 110 | 116 | |
| 111 | 117 | override var preferredStatusBarStyle: UIStatusBarStyle { |
| 112 | - | |
| 113 | 118 | return .lightContent |
| 114 | 119 | } |
| 115 | 120 | ... | ... |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_white_back.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "mine_info_header_icon_white_back@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "filename" : "mine_info_header_icon_white_back@3x.png", | |
| 14 | + "idiom" : "universal", | |
| 15 | + "scale" : "3x" | |
| 16 | + } | |
| 17 | + ], | |
| 18 | + "info" : { | |
| 19 | + "author" : "xcode", | |
| 20 | + "version" : 1 | |
| 21 | + } | |
| 22 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_white_back.imageset/mine_info_header_icon_white_back@2x.png
0 → 100644
369 Bytes
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_header_icon_white_back.imageset/mine_info_header_icon_white_back@3x.png
0 → 100644
652 Bytes
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_source_empty.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "mine_list_source_empty@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "filename" : "mine_list_source_empty@3x.png", | |
| 14 | + "idiom" : "universal", | |
| 15 | + "scale" : "3x" | |
| 16 | + } | |
| 17 | + ], | |
| 18 | + "info" : { | |
| 19 | + "author" : "xcode", | |
| 20 | + "version" : 1 | |
| 21 | + } | |
| 22 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_source_empty.imageset/mine_list_source_empty@2x.png
0 → 100644
21.8 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_list_source_empty.imageset/mine_list_source_empty@3x.png
0 → 100644
48.1 KB