From b016fba7a2621b99999ddf88ae7f2d51cd3a41a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=96=84=E6=A0=8B?= Date: Thu, 26 May 2022 10:30:21 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=9B=BF=E6=8D=A2chatUI=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Chat/Controller/GroupChatViewController.swift | 10 +++++----- .../Chat/Controller/P2PChatViewController.swift | 6 +++--- .../Classes/Chat/Controller/ReadViewController.swift | 8 ++++---- .../Chat/Controller/SelectUserViewController.swift | 12 ++++++------ .../Chat/Controller/UserSettingViewController.swift | 10 +++++----- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/GroupChatViewController.swift b/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/GroupChatViewController.swift index 865c9e7c..63e565b2 100644 --- a/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/GroupChatViewController.swift +++ b/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/GroupChatViewController.swift @@ -6,7 +6,7 @@ import UIKit import NIMSDK import NEKitCoreIM -class GroupChatViewController: ChatViewController, TeamChatViewModelDelegate { +public class GroupChatViewController: ChatViewController, TeamChatViewModelDelegate { // override init(session: NIMSession) { // super.init(session: session) @@ -27,12 +27,12 @@ class GroupChatViewController: ChatViewController, TeamChatViewModelDelegate { fatalError("init(coder:) has not been implemented") } - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() } - override func getSessionInfo(session: NIMSession) { + public override func getSessionInfo(session: NIMSession) { if let vm = self.viewmodel as? TeamChatViewModel { if let t = vm.getTeam(teamId: session.sessionId) { self.updateTeamInfo(team: t) @@ -53,13 +53,13 @@ class GroupChatViewController: ChatViewController, TeamChatViewModelDelegate { } // MARK: TeamChatViewModelDelegate - func onTeamRemoved(team: NIMTeam) { + public func onTeamRemoved(team: NIMTeam) { showSingleAlert(message: localizable("team_has_been_removed")) { self.navigationController?.popViewController(animated: true) } } - func onTeamUpdate(team: NIMTeam) { + public func onTeamUpdate(team: NIMTeam) { self.updateTeamInfo(team: team) } } diff --git a/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/P2PChatViewController.swift b/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/P2PChatViewController.swift index 2c36884f..f7035b10 100644 --- a/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/P2PChatViewController.swift +++ b/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/P2PChatViewController.swift @@ -4,15 +4,15 @@ import UIKit import NIMSDK -class P2PChatViewController: ChatViewController { +public class P2PChatViewController: ChatViewController { - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } - override func getSessionInfo(session: NIMSession) { + public override func getSessionInfo(session: NIMSession) { viewmodel.getUserInfo(userId: session.sessionId) let user = viewmodel.getUserInfo(userId: session.sessionId) let title = user?.showName() ?? "" diff --git a/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/ReadViewController.swift b/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/ReadViewController.swift index 484e7983..d85491a0 100644 --- a/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/ReadViewController.swift +++ b/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/ReadViewController.swift @@ -7,7 +7,7 @@ import NIMSDK import NEKitCoreIM import NEKitCommonUI -class ReadViewController: NEBaseViewController, UIScrollViewDelegate, UITableViewDelegate, UITableViewDataSource { +public class ReadViewController: NEBaseViewController, UIScrollViewDelegate, UITableViewDelegate, UITableViewDataSource { public var read: Bool = true public var line: UIView = UIView() @@ -27,7 +27,7 @@ class ReadViewController: NEBaseViewController, UIScrollViewDelegate, UITableVie fatalError("init(coder:) has not been implemented") } - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() commonUI() loadData(message: self.message) @@ -201,7 +201,7 @@ class ReadViewController: NEBaseViewController, UIScrollViewDelegate, UITableVie } } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if self.read { return self.readUsers.count }else { @@ -209,7 +209,7 @@ class ReadViewController: NEBaseViewController, UIScrollViewDelegate, UITableVie } } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "\(UserTableViewCell.self)", for: indexPath) as! UserTableViewCell if self.read { let model = self.readUsers[indexPath.row] diff --git a/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/SelectUserViewController.swift b/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/SelectUserViewController.swift index 1e43a9a6..df066b79 100644 --- a/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/SelectUserViewController.swift +++ b/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/SelectUserViewController.swift @@ -5,9 +5,9 @@ import UIKit import NEKitChat -typealias didSelectedAtRow = ( _ index: Int, _ model: ChatTeamMemberInfoModel?) -> () +public typealias didSelectedAtRow = ( _ index: Int, _ model: ChatTeamMemberInfoModel?) -> () -class SelectUserViewController: NEBaseViewController, UITableViewDelegate, UITableViewDataSource { +public class SelectUserViewController: NEBaseViewController, UITableViewDelegate, UITableViewDataSource { public var tableView = UITableView.init(frame: .zero, style: .plain) public var sessionId: String @@ -24,7 +24,7 @@ class SelectUserViewController: NEBaseViewController, UITableViewDelegate, UITab fatalError("init(coder:) has not been implemented") } - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() commonUI() loadData() @@ -109,14 +109,14 @@ class SelectUserViewController: NEBaseViewController, UITableViewDelegate, UITab } } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if let count = self.teamInfo?.users.count { return count + 1 } return 0 } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "\(ChatTeamMemberCell.self)", for: indexPath) as! ChatTeamMemberCell if indexPath.row == 0 { cell.headerView.image = UIImage.ne_imageNamed(name: "chat_team") @@ -129,7 +129,7 @@ class SelectUserViewController: NEBaseViewController, UITableViewDelegate, UITab return cell } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.row == 0 { if let block = self.selectedBlock { diff --git a/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/UserSettingViewController.swift b/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/UserSettingViewController.swift index 1890108d..e5af0778 100644 --- a/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/UserSettingViewController.swift +++ b/NEKitChat/NEKitChatUI/NEKitChatUI/Classes/Chat/Controller/UserSettingViewController.swift @@ -6,7 +6,7 @@ import UIKit import NEKitCommon import NIMSDK -class UserSettingViewController: NEBaseViewController, UserSettingViewModelDelegate { +public class UserSettingViewController: NEBaseViewController, UserSettingViewModelDelegate { var userId: String? @@ -53,7 +53,7 @@ class UserSettingViewController: NEBaseViewController, UserSettingViewModelDeleg return table }() - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() viewmodel.delegate = self setupUI() @@ -205,11 +205,11 @@ class UserSettingViewController: NEBaseViewController, UserSettingViewModelDeleg extension UserSettingViewController: UITableViewDataSource, UITableViewDelegate { - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return viewmodel.cellDatas.count } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let model = viewmodel.cellDatas[indexPath.row] if let cell = tableView.dequeueReusableCell(withIdentifier: "\(UserSettingSwitchCell.self)", for: indexPath) as? UserSettingBaseCell { cell.configure(model) @@ -218,7 +218,7 @@ extension UserSettingViewController: UITableViewDataSource, UITableViewDelegate return UITableViewCell() } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { // let model = viewmodel.cellDatas[indexPath.row] } From 2998539ceb6370ba96024328896b723d0ad79e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=96=84=E6=A0=8B?= Date: Thu, 26 May 2022 10:32:38 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=20contactUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Classes/Base/ContactBaseViewCell.swift | 1 - .../ViewController/BlackListViewController.swift | 4 ++-- .../Team/ViewController/TeamListViewController.swift | 6 +++--- .../ContactRemakNameViewController.swift | 6 +++--- .../ValidationMessageViewController.swift | 10 +++++----- .../Classes/Views/FindFriendViewController.swift | 8 ++++---- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Base/ContactBaseViewCell.swift b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Base/ContactBaseViewCell.swift index b9e73f86..4bf30c68 100644 --- a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Base/ContactBaseViewCell.swift +++ b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Base/ContactBaseViewCell.swift @@ -69,7 +69,6 @@ open class ContactBaseViewCell: UITableViewCell { contentView.addSubview(avatarImage) leftConstraint = avatarImage.leftAnchor.constraint(equalTo: self.contentView.leftAnchor, constant: 20) leftConstraint?.isActive = true - NSLayoutConstraint.activate([ avatarImage.widthAnchor.constraint(equalToConstant: 36), avatarImage.heightAnchor.constraint(equalToConstant: 36), diff --git a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/BlackList/ViewController/BlackListViewController.swift b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/BlackList/ViewController/BlackListViewController.swift index 35180ea5..b1e98280 100644 --- a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/BlackList/ViewController/BlackListViewController.swift +++ b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/BlackList/ViewController/BlackListViewController.swift @@ -6,12 +6,12 @@ import UIKit import NEKitCoreIM import NEKitCommon -class BlackListViewController: UIViewController, UITableViewDelegate, UITableViewDataSource,TeamTableViewCellDelegate { +public class BlackListViewController: UIViewController, UITableViewDelegate, UITableViewDataSource,TeamTableViewCellDelegate { var tableView = UITableView(frame: .zero, style: .plain) var viewModel = BlackListViewModel() public var blackList: [User]? - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() commonUI() loadData() diff --git a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Team/ViewController/TeamListViewController.swift b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Team/ViewController/TeamListViewController.swift index 22cca722..3c2ce55d 100644 --- a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Team/ViewController/TeamListViewController.swift +++ b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Team/ViewController/TeamListViewController.swift @@ -7,12 +7,12 @@ import UIKit import NIMSDK import NEKitCore -class TeamListViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { +public class TeamListViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { var tableView = UITableView(frame: .zero, style: .plain) var viewModel = TeamListViewModel() var isClickCallBack = false - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() commonUI() loadData() @@ -54,7 +54,7 @@ class TeamListViewController: UIViewController, UITableViewDelegate, UITableView return cell } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let model = viewModel.teamList[indexPath.row] if isClickCallBack == true { Router.shared.use(ContactTeamDataRouter, parameters: ["team": model.nimTeam as Any], closure: nil) diff --git a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/UserInfo/ViewController/ContactRemakNameViewController.swift b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/UserInfo/ViewController/ContactRemakNameViewController.swift index dcc10a20..d1c589e6 100644 --- a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/UserInfo/ViewController/ContactRemakNameViewController.swift +++ b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/UserInfo/ViewController/ContactRemakNameViewController.swift @@ -7,7 +7,7 @@ import UIKit import NEKitCoreIM import NEKitCore -class ContactRemakNameViewController: ContactBaseViewController, UITextFieldDelegate { +public class ContactRemakNameViewController: ContactBaseViewController, UITextFieldDelegate { typealias ModifyBlock = (_ user: User) -> Void @@ -29,7 +29,7 @@ class ContactRemakNameViewController: ContactBaseViewController, UITextFieldDele // return btn // }() - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -106,7 +106,7 @@ class ContactRemakNameViewController: ContactBaseViewController, UITextFieldDele } */ - func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { let text = "\(textField.text ?? "")\(string)" print("text count : ", text.count) if text.count > 30 { diff --git a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Validation/ViewController/ValidationMessageViewController.swift b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Validation/ViewController/ValidationMessageViewController.swift index e0616007..84467c29 100644 --- a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Validation/ViewController/ValidationMessageViewController.swift +++ b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Validation/ViewController/ValidationMessageViewController.swift @@ -11,14 +11,14 @@ public class ValiationMessageConfig { } -class ValidationMessageViewController: ContactBaseViewController { +public class ValidationMessageViewController: ContactBaseViewController { let viewModel = ValidationMessageViewModel() let tableView = UITableView() private let tag = "ValidationMessageViewController" - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -68,11 +68,11 @@ class ValidationMessageViewController: ContactBaseViewController { extension ValidationMessageViewController: UITableViewDelegate, UITableViewDataSource { - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return viewModel.datas.count } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let noti = viewModel.datas[indexPath.row] let reuseIdentifier = "\(SystemNotificationCell.self)" @@ -82,7 +82,7 @@ extension ValidationMessageViewController: UITableViewDelegate, UITableViewDataS return cell } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 60 } diff --git a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Views/FindFriendViewController.swift b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Views/FindFriendViewController.swift index c485a5e9..60a87046 100644 --- a/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Views/FindFriendViewController.swift +++ b/NEKitContact/NEKitContactUI/NEKitContactUI/Classes/Views/FindFriendViewController.swift @@ -5,7 +5,7 @@ import UIKit -class FindFriendViewController: ContactBaseViewController, UITextFieldDelegate { +public class FindFriendViewController: ContactBaseViewController, UITextFieldDelegate { let viewModel = FindFriendViewModel() let noResultView = UIView() @@ -30,13 +30,13 @@ class FindFriendViewController: ContactBaseViewController, UITextFieldDelegate { return label }() - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() self.title = "添加好友" setupUI() } - override func viewWillAppear(_ animated: Bool) { + public override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) navigationController?.isNavigationBarHidden = false } @@ -99,7 +99,7 @@ class FindFriendViewController: ContactBaseViewController, UITextFieldDelegate { userLabel.isHidden = true } - func textFieldShouldReturn(_ textField: UITextField) -> Bool { + public func textFieldShouldReturn(_ textField: UITextField) -> Bool { guard let text = textField.text else { return false From 66bd7bfa89d06dacdc3243d467bfb5ad86d83940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=96=84=E6=A0=8B?= Date: Thu, 26 May 2022 10:34:33 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=9B=BF=E6=8D=A2conversationUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Conversation/Controller/ConversationSearchController.swift | 2 +- .../NEKitConversationUI/Classes/Util/NEMessageUtil.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEKitConversation/NEKitConversationUI/NEKitConversationUI/Classes/Conversation/Controller/ConversationSearchController.swift b/NEKitConversation/NEKitConversationUI/NEKitConversationUI/Classes/Conversation/Controller/ConversationSearchController.swift index 55bba96e..40997b8d 100644 --- a/NEKitConversation/NEKitConversationUI/NEKitConversationUI/Classes/Conversation/Controller/ConversationSearchController.swift +++ b/NEKitConversation/NEKitConversationUI/NEKitConversationUI/Classes/Conversation/Controller/ConversationSearchController.swift @@ -6,7 +6,7 @@ import UIKit import NIMSDK - class SearchSessionHeaderView:UITableViewHeaderFooterView { +class SearchSessionHeaderView:UITableViewHeaderFooterView { override init(reuseIdentifier: String?) { super.init(reuseIdentifier: reuseIdentifier) diff --git a/NEKitConversation/NEKitConversationUI/NEKitConversationUI/Classes/Util/NEMessageUtil.swift b/NEKitConversation/NEKitConversationUI/NEKitConversationUI/Classes/Util/NEMessageUtil.swift index 30c6858a..9e45ec58 100644 --- a/NEKitConversation/NEKitConversationUI/NEKitConversationUI/Classes/Util/NEMessageUtil.swift +++ b/NEKitConversation/NEKitConversationUI/NEKitConversationUI/Classes/Util/NEMessageUtil.swift @@ -25,7 +25,7 @@ public class NEMessageUtil { text = "[图片]" break case .video: - text = "[视屏]" + text = "[视频]" break case .location: text = "[位置]" From 5de99e3154194597b3e0b149766a83d10c3da0e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=96=84=E6=A0=8B?= Date: Thu, 26 May 2022 10:36:23 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=9B=BF=E6=8D=A2qchatUI=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewController/QChatAddMemberVC.swift | 8 ++--- .../ViewController/QChatAddRoleGroupVC.swift | 8 ++--- .../QChatChannelAuthoritySettingVC.swift | 10 +++---- .../QChatChannelMembersVC.swift | 8 ++--- .../QChatChannelSettingVC.swift | 8 ++--- .../QChatGroupPermissionSettingVC.swift | 8 ++--- .../QChatMemberPermissionSettingVC.swift | 8 ++--- .../ViewController/QChatSearchVC.swift | 8 ++--- .../QChatWhiteBlackListVC.swift | 10 +++---- .../CreateServerViewController.swift | 10 +++---- .../Controller/MemberListViewController.swift | 10 +++---- .../MineCreateServerController.swift | 6 ++-- .../QChatCreateGroupViewController.swift | 24 +++++++-------- .../QChatEditMemberViewController.swift | 22 +++++++------- .../QChatIdGroupSortController.swift | 30 +++++++++---------- .../QChatIdGroupViewController.swift | 28 ++++++++--------- .../QChatMemberManagerController.swift | 30 +++++++++---------- .../QChatMemberSelectController.swift | 26 ++++++++-------- .../QChatPermissionViewController.swift | 22 +++++++------- .../QChatServerSettingViewController.swift | 24 +++++++-------- 20 files changed, 154 insertions(+), 154 deletions(-) diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatAddMemberVC.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatAddMemberVC.swift index 433e7e34..048d87ee 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatAddMemberVC.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatAddMemberVC.swift @@ -8,7 +8,7 @@ import CoreAudio import MJRefresh typealias AddMemberRoleBlock = (_ memberRole: MemberRole?) -> Void -class QChatAddMemberVC: QChatSearchVC { +public class QChatAddMemberVC: QChatSearchVC { public var channel: ChatChannel? private var serverMembers:[ServerMemeber]? private var channelMembers:[ServerMemeber]? @@ -24,7 +24,7 @@ class QChatAddMemberVC: QChatSearchVC { super.init(coder: coder) } - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() self.title = localizable("add_member") self.tableView.register(QChatImageTextCell.self, forCellReuseIdentifier: "\(QChatImageTextCell.self)") @@ -149,11 +149,11 @@ class QChatAddMemberVC: QChatSearchVC { } } - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return self.serverMembers?.count ?? 0 } - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "\(QChatImageTextCell.self)", for: indexPath) as! QChatImageTextCell cell.backgroundColor = .white cell.rightStyle = .indicate diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatAddRoleGroupVC.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatAddRoleGroupVC.swift index 1386eeb2..176cc233 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatAddRoleGroupVC.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatAddRoleGroupVC.swift @@ -7,7 +7,7 @@ import NEKitCoreIM import MJRefresh typealias AddChannelRoleBlock = (_ role: ChannelRole?) -> Void -class QChatAddRoleGroupVC: QChatSearchVC { +public class QChatAddRoleGroupVC: QChatSearchVC { public var channel: ChatChannel? private var serverRoles:[ServerRole]? private var channelRoles:[ChannelRole]? @@ -15,7 +15,7 @@ class QChatAddRoleGroupVC: QChatSearchVC { private var priority: Int? private lazy var placeholderView: EmptyDataView = EmptyDataView(imageName: "rolePlaceholder", content: localizable("has_no_role"), frame: CGRect(x: 0, y: 60, width: self.view.bounds.size.width, height: self.view.bounds.size.height)) - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() self.title = localizable("add_group") self.tableView.register(QChatTextArrowCell.self, forCellReuseIdentifier: "\(QChatTextArrowCell.self)") @@ -158,11 +158,11 @@ class QChatAddRoleGroupVC: QChatSearchVC { } } - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return self.serverRoles?.count ?? 0 } - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "\(QChatTextArrowCell.self)", for: indexPath) as! QChatTextArrowCell cell.backgroundColor = .white cell.titleLabel.text = self.serverRoles?[indexPath.row].name diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelAuthoritySettingVC.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelAuthoritySettingVC.swift index 4a8eac69..f7fec7e7 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelAuthoritySettingVC.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelAuthoritySettingVC.swift @@ -5,7 +5,7 @@ import UIKit import NEKitCoreIM -class QChatChannelAuthoritySettingVC: QChatTableViewController { +public class QChatChannelAuthoritySettingVC: QChatTableViewController { var channel: ChatChannel? var viewModel: QChatAuthoritySettingViewModel? var sectionTitle: [String] = ["",localizable("qchat_id_group"),localizable("qchat_member")] @@ -23,14 +23,14 @@ class QChatChannelAuthoritySettingVC: QChatTableViewController { fatalError("init(coder:) has not been implemented") } - override func viewWillAppear(_ animated: Bool) { + public override func viewWillAppear(_ animated: Bool) { print("viewWillAppear") loadData() } - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() commonUI() } @@ -78,7 +78,7 @@ class QChatChannelAuthoritySettingVC: QChatTableViewController { return sectionTitle.count } - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { switch section { case 0: return staticData.count @@ -91,7 +91,7 @@ class QChatChannelAuthoritySettingVC: QChatTableViewController { } } - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { switch indexPath.section { case 0: let cell = tableView.dequeueReusableCell(withIdentifier: "\(QChatTextArrowCell.self)", for: indexPath) as! QChatTextArrowCell diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelMembersVC.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelMembersVC.swift index 25186178..423c9736 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelMembersVC.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelMembersVC.swift @@ -6,14 +6,14 @@ import UIKit import NEKitCoreIM import MJRefresh -class QChatChannelMembersVC: QChatTableViewController, QChatMemberInfoViewDelegate { +public class QChatChannelMembersVC: QChatTableViewController, QChatMemberInfoViewDelegate { public var channel: ChatChannel? private var channelMembers:[ServerMemeber]? var memberInfoView: QChatMemberInfoView? var lastMember: ServerMemeber? - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() commonUI() loadData() @@ -65,11 +65,11 @@ class QChatChannelMembersVC: QChatTableViewController, QChatMemberInfoViewDelega } } - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return self.channelMembers?.count ?? 0 } - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "\(QChatImageTextOnlineCell.self)", for: indexPath) as! QChatImageTextOnlineCell let member = self.channelMembers![indexPath.row] as ServerMemeber cell.setup(accid: member.accid, nickName: member.nick) diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelSettingVC.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelSettingVC.swift index 7b29ea36..4017e75c 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelSettingVC.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatChannelSettingVC.swift @@ -7,7 +7,7 @@ import NEKitCoreIM typealias updateChannelSuccess = (_ channel: ChatChannel?) -> Void -class QChatChannelSettingVC: QChatTableViewController, QChatTextEditCellDelegate { +public class QChatChannelSettingVC: QChatTableViewController, QChatTextEditCellDelegate { var viewModel: QChatUpdateChannelViewModel? var didUpdateChannel: updateChannelSuccess? var didDeleteChannel: updateChannelSuccess? @@ -15,7 +15,7 @@ class QChatChannelSettingVC: QChatTableViewController, QChatTextEditCellDelegate var sections: [String]? var cells = [String]() - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() loadData() commonUI() @@ -46,11 +46,11 @@ class QChatChannelSettingVC: QChatTableViewController, QChatTextEditCellDelegate return sections?.count ?? 0 } - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 1 } - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { switch indexPath.section { case 0: let cell = tableView.dequeueReusableCell(withIdentifier: "\(QChatTextEditCell.self)", for: indexPath) as! QChatTextEditCell diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatGroupPermissionSettingVC.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatGroupPermissionSettingVC.swift index 9d44a74a..de8f8475 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatGroupPermissionSettingVC.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatGroupPermissionSettingVC.swift @@ -7,7 +7,7 @@ import NEKitCoreIM typealias channelUpdateSettingBlock = (_ channelRole: ChannelRole?) -> () -class QChatGroupPermissionSettingVC: QChatTableViewController, QChatPermissionSettingCellDelegate { +public class QChatGroupPermissionSettingVC: QChatTableViewController, QChatPermissionSettingCellDelegate { // public var didUpdateBlock: channelUpdateSettingBlock? public var cRole: ChannelRole? private var commonAuths = [RoleStatusInfoExt]() @@ -24,7 +24,7 @@ class QChatGroupPermissionSettingVC: QChatTableViewController, QChatPermissionSe fatalError("init(coder:) has not been implemented") } - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() if let name = self.cRole?.name { self.title = name + localizable("authority_setting") @@ -78,11 +78,11 @@ class QChatGroupPermissionSettingVC: QChatTableViewController, QChatPermissionSe return self.auths.count } - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return self.auths[section].count } - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "\(QChatPermissionSettingCell.self)", for: indexPath) as! QChatPermissionSettingCell let auths = self.auths[indexPath.section] let authExt = auths[indexPath.row] diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatMemberPermissionSettingVC.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatMemberPermissionSettingVC.swift index 67dbe19a..81eb5048 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatMemberPermissionSettingVC.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatMemberPermissionSettingVC.swift @@ -6,7 +6,7 @@ import UIKit import NEKitCoreIM typealias updateSettingBlock = (_ memberRole: MemberRole?) -> () -class QChatMemberPermissionSettingVC: QChatTableViewController, QChatPermissionSettingCellDelegate { +public class QChatMemberPermissionSettingVC: QChatTableViewController, QChatPermissionSettingCellDelegate { public var channel: ChatChannel? public var memberRole: MemberRole? // public var didUpdateBlock: updateSettingBlock? @@ -26,7 +26,7 @@ class QChatMemberPermissionSettingVC: QChatTableViewController, QChatPermissionS fatalError("init(coder:) has not been implemented") } - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() self.title = localizable("member_permission_setting") self.tableView.register(QChatPermissionSettingCell.self, forCellReuseIdentifier: "\(QChatPermissionSettingCell.self)") @@ -82,11 +82,11 @@ class QChatMemberPermissionSettingVC: QChatTableViewController, QChatPermissionS return self.auths.count } - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return self.auths[section].count } - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if indexPath.section == 0 { //用户 let cell = tableView.dequeueReusableCell(withIdentifier: "\(QChatImageTextCell.self)", for: indexPath) as! QChatImageTextCell diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatSearchVC.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatSearchVC.swift index aed5639b..b88c00eb 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatSearchVC.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatSearchVC.swift @@ -4,11 +4,11 @@ import UIKit -class QChatSearchVC: NEBaseViewController, UITableViewDelegate, UITableViewDataSource { +public class QChatSearchVC: NEBaseViewController, UITableViewDelegate, UITableViewDataSource { var textField = UITextField() var tableView = UITableView(frame: .zero, style: .plain) - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() commonUI() } @@ -65,11 +65,11 @@ class QChatSearchVC: NEBaseViewController, UITableViewDelegate, UITableViewDataS } // MARK:UITableViewDataSource - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 0; } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "\(UITableViewCell.self)", for: indexPath) return cell } diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatWhiteBlackListVC.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatWhiteBlackListVC.swift index 45471ddb..b47013fc 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatWhiteBlackListVC.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Channel/ViewController/QChatWhiteBlackListVC.swift @@ -6,13 +6,13 @@ import UIKit import NEKitCoreIM import NEKitCore -class QChatWhiteBlackListVC: QChatTableViewController, QChatMemberSelectControllerDelegate { +public class QChatWhiteBlackListVC: QChatTableViewController, QChatMemberSelectControllerDelegate { public var type: RoleType = .white public var channel: ChatChannel? private var memberArray: [ServerMemeber]? private var isEdited: Bool = false - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() self.isEdited = false self.title = self.type == .white ? localizable("white_list") : localizable("black_list") @@ -38,7 +38,7 @@ class QChatWhiteBlackListVC: QChatTableViewController, QChatMemberSelectControll return 2 } - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if section == 0 { return 1 }else { @@ -46,7 +46,7 @@ class QChatWhiteBlackListVC: QChatTableViewController, QChatMemberSelectControll } } - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if indexPath.section == 0 { let cell = tableView.dequeueReusableCell(withIdentifier: "\(QChatTextCell.self)", for: indexPath) as! QChatTextCell cell.backgroundColor = .white @@ -178,7 +178,7 @@ class QChatWhiteBlackListVC: QChatTableViewController, QChatMemberSelectControll self.tableView.reloadData() } - func filterMembers(accid: [String]?, _ filterMembers: @escaping ([String]?) -> ()) { + public func filterMembers(accid: [String]?, _ filterMembers: @escaping ([String]?) -> ()) { let type: ChannelMemberRoleType = self.type == .white ? .white : .black let param = GetExistingChannelBlackWhiteMembersParam(serverId: self.channel?.serverId, channelId: self.channel?.channelId, type: type, accIds: accid) QChatChannelProvider.shared.getExistingChannelBlackWhiteMembers(param: param) { error, result in diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/CreateServerViewController.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/CreateServerViewController.swift index 7ac91a92..a828bbd6 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/CreateServerViewController.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/CreateServerViewController.swift @@ -4,7 +4,7 @@ import UIKit - class CreateServerViewController: NEBaseViewController { + public class CreateServerViewController: NEBaseViewController { public var serverViewModel = CreateServerViewModel() @@ -56,18 +56,18 @@ extension CreateServerViewController { extension CreateServerViewController:UITableViewDelegate,UITableViewDataSource { - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return serverViewModel.dataArray.count } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "\(NSStringFromClass(NECreateServerCell.self))", for: indexPath) as! NECreateServerCell let model = serverViewModel.dataArray[indexPath.row] cell.model = model return cell } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.row == 0 { let mineCreateCtrl = MineCreateServerController() @@ -78,7 +78,7 @@ extension CreateServerViewController:UITableViewDelegate,UITableViewDataSource { } } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 76 } diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/MemberListViewController.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/MemberListViewController.swift index 9d861641..d337302a 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/MemberListViewController.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/MemberListViewController.swift @@ -5,7 +5,7 @@ import UIKit import NEKitCoreIM import NEKitCore -class MemberListViewController: NEBaseViewController { +public class MemberListViewController: NEBaseViewController { public var serverViewModel = CreateServerViewModel() public var memberViewModel = MemberListViewModel() @@ -13,7 +13,7 @@ class MemberListViewController: NEBaseViewController { var dataArray:Array? var serverId: UInt64? - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() initializeConfig() requestData() @@ -109,19 +109,19 @@ extension MemberListViewController:UITableViewDelegate,UITableViewDataSource { // } } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return dataArray?.count ?? 0 } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "\(NSStringFromClass(NEGroupIdentityMemberCell.self))", for: indexPath) as! NEGroupIdentityMemberCell cell.memberModel = dataArray?[indexPath.row] return cell } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { // let user = viewModel.limitUsers[indexPath.row] if let member = dataArray?[indexPath.row] { diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/MineCreateServerController.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/MineCreateServerController.swift index 560d3112..f6418ecf 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/MineCreateServerController.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/QChatHomePage/Controller/MineCreateServerController.swift @@ -8,13 +8,13 @@ import NEKitCoreIM import NIMSDK import NEKitCommon - class MineCreateServerController: NEBaseViewController, UINavigationControllerDelegate { +public class MineCreateServerController: NEBaseViewController, UINavigationControllerDelegate { private let tag = "MineCreateServerController" public var serverViewModel = CreateServerViewModel() var headImageUrl:String? - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() initializeConfig() setupSubviews() @@ -176,7 +176,7 @@ extension MineCreateServerController:UITextFieldDelegate{ } - func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { let text = "\(textField.text ?? "")\(string)" if text.count > 50 { diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatCreateGroupViewController.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatCreateGroupViewController.swift index 7eeb3c95..7e76d994 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatCreateGroupViewController.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatCreateGroupViewController.swift @@ -7,7 +7,7 @@ import NEKitCoreIM typealias CreateCompletion = () -> Void -class QChatCreateGroupViewController: NEBaseTableViewController, QChatMemberSelectControllerDelegate { +public class QChatCreateGroupViewController: NEBaseTableViewController, QChatMemberSelectControllerDelegate { let viewModel = CreateGroupViewModel() @@ -17,7 +17,7 @@ class QChatCreateGroupViewController: NEBaseTableViewController, QChatMemberSele var completion: CreateCompletion? - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -116,7 +116,7 @@ extension QChatCreateGroupViewController: UITextFieldDelegate { extension QChatCreateGroupViewController: UITableViewDataSource, UITableViewDelegate, ViewModelDelegate, QChatTextEditCellDelegate { - func filterMembers(accid: [String]?, _ filterMembers: @escaping ([String]?) -> ()) { + public func filterMembers(accid: [String]?, _ filterMembers: @escaping ([String]?) -> ()) { var dic = [String : String]() viewModel.allUsers.forEach { user in @@ -148,16 +148,16 @@ extension QChatCreateGroupViewController: UITableViewDataSource, UITableViewDele } - func dataDidError(_ error: Error) { + public func dataDidError(_ error: Error) { UIApplication.shared.keyWindow?.endEditing(true) view.makeToast(error.localizedDescription) } - func dataDidChange() { + public func dataDidChange() { tableView.reloadData() } - func numberOfSections(in tableView: UITableView) -> Int { + public func numberOfSections(in tableView: UITableView) -> Int { let count = 3 // if viewModel.limitUsers.count < viewModel.allUsers.count { // count = count + 1 @@ -165,7 +165,7 @@ extension QChatCreateGroupViewController: UITableViewDataSource, UITableViewDele return count } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if section == 0 || section == 1 { return 1 }else if section == 2 { @@ -176,7 +176,7 @@ extension QChatCreateGroupViewController: UITableViewDataSource, UITableViewDele return 0 } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if indexPath.section == 0 { let cell: QChatTextEditCell = tableView.dequeueReusableCell(withIdentifier: "\(QChatTextEditCell.self)", for: indexPath) as! QChatTextEditCell @@ -205,7 +205,7 @@ extension QChatCreateGroupViewController: UITableViewDataSource, UITableViewDele return UITableViewCell() } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.section == 1 { let memberSelect = QChatMemberSelectController() @@ -235,11 +235,11 @@ extension QChatCreateGroupViewController: UITableViewDataSource, UITableViewDele } } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 50 } - func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { if section == 0 || section == 1 { return 40.0 }else if section == 2 { @@ -248,7 +248,7 @@ extension QChatCreateGroupViewController: UITableViewDataSource, UITableViewDele return 0 } - func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { let header = QChatHeaderView() if section == 0 { diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatEditMemberViewController.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatEditMemberViewController.swift index c49db746..e43823e1 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatEditMemberViewController.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatEditMemberViewController.swift @@ -12,7 +12,7 @@ typealias EditMemberChange = () -> Void typealias EditMemberDelete = () -> Void -class QChatEditMemberViewController: NEBaseTableViewController { +public class QChatEditMemberViewController: NEBaseTableViewController { var user: UserInfo? var editAble = false @@ -26,7 +26,7 @@ class QChatEditMemberViewController: NEBaseTableViewController { var didChange = false - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -89,19 +89,19 @@ extension QChatEditMemberViewController: UITableViewDataSource, UITableViewDeleg } } - func dataDidChange() { + public func dataDidChange() { tableView.reloadData() } - func dataDidError(_ error: Error) { + public func dataDidError(_ error: Error) { showToast(error.localizedDescription) } - func numberOfSections(in tableView: UITableView) -> Int { + public func numberOfSections(in tableView: UITableView) -> Int { return 5 } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if section == 0 || section == 1 { return 1 }else if section == 2 { @@ -116,7 +116,7 @@ extension QChatEditMemberViewController: UITableViewDataSource, UITableViewDeleg return 0 } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if indexPath.section == 0 { let cell: QChatHeaderCell = tableView.dequeueReusableCell(withIdentifier: "\(QChatHeaderCell.self)", for: indexPath) as! QChatHeaderCell @@ -177,14 +177,14 @@ extension QChatEditMemberViewController: UITableViewDataSource, UITableViewDeleg return UITableViewCell() } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { if indexPath.section == 0 { return 92 } return 50 } - func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { let header = QChatHeaderView() if section == 1 { header.titleLabel.text = localizable("qchat_nickname") @@ -198,7 +198,7 @@ extension QChatEditMemberViewController: UITableViewDataSource, UITableViewDeleg return nil } - func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { if section == 0 { return 22 @@ -218,7 +218,7 @@ extension QChatEditMemberViewController: UITableViewDataSource, UITableViewDeleg return 0 } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.section == 1 { //showToast("请点击编辑后修改昵称") diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatIdGroupSortController.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatIdGroupSortController.swift index e4c86d1b..9ac7bd03 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatIdGroupSortController.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatIdGroupSortController.swift @@ -9,7 +9,7 @@ import NEKitCoreIM typealias SortChange = () -> Void -class QChatIdGroupSortController: NEBaseTableViewController { +public class QChatIdGroupSortController: NEBaseTableViewController { var serverId: UInt64? @@ -23,7 +23,7 @@ class QChatIdGroupSortController: NEBaseTableViewController { var completion: SortChange? - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -83,20 +83,20 @@ class QChatIdGroupSortController: NEBaseTableViewController { extension QChatIdGroupSortController: UITableViewDelegate, UITableViewDataSource, ViewModelDelegate { - func dataDidChange() { + public func dataDidChange() { tableView.reloadData() } - func dataDidError(_ error: Error) { + public func dataDidError(_ error: Error) { view.hideToastActivity() showToast(error.localizedDescription) } - func numberOfSections(in tableView: UITableView) -> Int { + public func numberOfSections(in tableView: UITableView) -> Int { return 1 } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // if section == 0 { // return viewmodel.lockData.count // }else if section == 1 { @@ -105,7 +105,7 @@ extension QChatIdGroupSortController: UITableViewDelegate, UITableViewDataSource return viewmodel.datas.count } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell: QChatSortCell = tableView.dequeueReusableCell(withIdentifier: "\(QChatSortCell.self)", for: indexPath) as! QChatSortCell // if indexPath.section == 0 { @@ -126,7 +126,7 @@ extension QChatIdGroupSortController: UITableViewDelegate, UITableViewDataSource return cell } - func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { + public func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) { print("source :" , sourceIndexPath.row , " destionation :" ,destinationIndexPath.row) if sourceIndexPath.row > destinationIndexPath.row { @@ -147,15 +147,15 @@ extension QChatIdGroupSortController: UITableViewDelegate, UITableViewDataSource } } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 60 } - func tableView(_ tableView: UITableView, shouldIndentWhileEditingRowAt indexPath: IndexPath) -> Bool { + public func tableView(_ tableView: UITableView, shouldIndentWhileEditingRowAt indexPath: IndexPath) -> Bool { return false } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if let model = viewmodel.datas[indexPath.row] as? IdGroupModel { weak var weakSelf = self if model.hasPermission == true { @@ -170,7 +170,7 @@ extension QChatIdGroupSortController: UITableViewDelegate, UITableViewDataSource } } - func tableView(_ tableView: UITableView, targetIndexPathForMoveFromRowAt sourceIndexPath: IndexPath, toProposedIndexPath proposedDestinationIndexPath: IndexPath) -> IndexPath { + public func tableView(_ tableView: UITableView, targetIndexPathForMoveFromRowAt sourceIndexPath: IndexPath, toProposedIndexPath proposedDestinationIndexPath: IndexPath) -> IndexPath { if isOwer == true { return proposedDestinationIndexPath }else { @@ -183,21 +183,21 @@ extension QChatIdGroupSortController: UITableViewDelegate, UITableViewDataSource return sourceIndexPath } - func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + public func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { if let model = viewmodel.datas[indexPath.row] as? IdGroupModel { return model.hasPermission } return true } - func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { + public func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { if let model = viewmodel.datas[indexPath.row] as? IdGroupModel { return model.hasPermission } return true } - func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCell.EditingStyle { + public func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCell.EditingStyle { return UITableViewCell.EditingStyle.none } diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatIdGroupViewController.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatIdGroupViewController.swift index 462c5fb3..124e0f39 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatIdGroupViewController.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatIdGroupViewController.swift @@ -5,13 +5,13 @@ import UIKit import MJRefresh -class QChatIdGroupViewController: NEBaseTableViewController { +public class QChatIdGroupViewController: NEBaseTableViewController { let viewModel = IdGroupViewModel() var isOwner = false var serverid: UInt64? - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -70,27 +70,27 @@ class QChatIdGroupViewController: NEBaseTableViewController { extension QChatIdGroupViewController: UITableViewDelegate, UITableViewDataSource, ViewModelDelegate { - func dataDidError(_ error: Error) { + public func dataDidError(_ error: Error) { print("get roles error : ", error) QChatLog.errorLog(className(), desc: "error : \(error)") view.makeToast(error.localizedDescription) } - func dataDidChange() { + public func dataDidChange() { tableView.mj_footer?.endRefreshing() tableView.reloadData() } - func dataNoMore() { + public func dataNoMore() { tableView.mj_footer?.endRefreshingWithNoMoreData() tableView.mj_footer?.isHidden = true } - func numberOfSections(in tableView: UITableView) -> Int { + public func numberOfSections(in tableView: UITableView) -> Int { return 3 } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if section == 0 { return viewModel.topDatas.count }else if section == 1 { @@ -103,7 +103,7 @@ extension QChatIdGroupViewController: UITableViewDelegate, UITableViewDataSource return 0 } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if indexPath.section == 0 { let model = viewModel.topDatas[indexPath.row] let cell: QChatIdGroupTopCell = tableView.dequeueReusableCell(withIdentifier: "\(QChatIdGroupTopCell.self)", for: indexPath) as! QChatIdGroupTopCell @@ -124,7 +124,7 @@ extension QChatIdGroupViewController: UITableViewDelegate, UITableViewDataSource return UITableViewCell() } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { if indexPath.section == 0 { return 68 }else if indexPath.section == 1 { @@ -135,14 +135,14 @@ extension QChatIdGroupViewController: UITableViewDelegate, UITableViewDataSource return 0 } - func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { if section == 1 { return 6 } return 0 } - func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { if section == 1 { let view = UIView(frame: CGRect.zero) view.backgroundColor = UIColor(hexString: "EFF1F4") @@ -151,15 +151,15 @@ extension QChatIdGroupViewController: UITableViewDelegate, UITableViewDataSource return nil } - func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { return 0 } - func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { + public func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { return nil } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.section == 1 { return diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatMemberManagerController.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatMemberManagerController.swift index 25dbd53a..faf70adb 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatMemberManagerController.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatMemberManagerController.swift @@ -8,7 +8,7 @@ import NEKitCoreIM typealias MemberCountChange = (Int) -> Void -class QChatMemberManagerController: NEBaseTableViewController { +public class QChatMemberManagerController: NEBaseTableViewController { let viewmodel = MemberManagerViewModel() @@ -20,7 +20,7 @@ class QChatMemberManagerController: NEBaseTableViewController { var countChangeBlock: MemberCountChange? - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -66,7 +66,7 @@ class QChatMemberManagerController: NEBaseTableViewController { extension QChatMemberManagerController: UITableViewDelegate, UITableViewDataSource, ViewModelDelegate, QChatMemberSelectControllerDelegate { - func filterMembers(accid: [String]?, _ filterMembers: @escaping ([String]?) -> ()) { + public func filterMembers(accid: [String]?, _ filterMembers: @escaping ([String]?) -> ()) { var param = GetExistingServerRoleMembersByAccidsParam() param.serverId = serverId param.accids = accid @@ -89,27 +89,27 @@ extension QChatMemberManagerController: UITableViewDelegate, UITableViewDataSour } } - func dataDidChange() { + public func dataDidChange() { view.hideToastActivity() tableView.mj_footer?.endRefreshing() tableView.reloadData() } - func dataNoMore() { + public func dataNoMore() { view.hideToastActivity() tableView.mj_footer?.endRefreshingWithNoMoreData() tableView.mj_footer?.isHidden = true } - func dataDidError(_ error: Error) { + public func dataDidError(_ error: Error) { showToast(error.localizedDescription) } - func numberOfSections(in tableView: UITableView) -> Int { + public func numberOfSections(in tableView: UITableView) -> Int { return 2 } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if section == 0 { return 1 } @@ -119,7 +119,7 @@ extension QChatMemberManagerController: UITableViewDelegate, UITableViewDataSour return 0 } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if indexPath.section == 0 { let cell: QChatPlainTextArrowCell = tableView.dequeueReusableCell(withIdentifier: "\(QChatPlainTextArrowCell.self)", for: indexPath) as! QChatPlainTextArrowCell @@ -138,27 +138,27 @@ extension QChatMemberManagerController: UITableViewDelegate, UITableViewDataSour return UITableViewCell() } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 50 } - func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return 0 } - func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { return 0 } - func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { return nil } - func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { + public func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { return nil } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { weak var weakSelf = self if indexPath.section == 0 { let memberSelect = QChatMemberSelectController() diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatMemberSelectController.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatMemberSelectController.swift index 4b80a981..ac82353d 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatMemberSelectController.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatMemberSelectController.swift @@ -17,7 +17,7 @@ public protocol QChatMemberSelectControllerDelegate: AnyObject { // case ChannelMember //} -class QChatMemberSelectController: NEBaseTableViewController,MemberSelectViewModelDelegate { +public class QChatMemberSelectController: NEBaseTableViewController,MemberSelectViewModelDelegate { let viewmodel = MemberSelectViewModel() var filterBlock: FilterMembersBlock? @@ -45,7 +45,7 @@ class QChatMemberSelectController: NEBaseTableViewController,MemberSelectViewMod var selectArray = [UserInfo]() - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() viewmodel.delegate = self loadData() @@ -140,51 +140,51 @@ class QChatMemberSelectController: NEBaseTableViewController,MemberSelectViewMod extension QChatMemberSelectController: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, UITableViewDelegate, UITableViewDataSource, ViewModelDelegate { - func dataDidError(_ error: Error) { + public func dataDidError(_ error: Error) { view.makeToast(error.localizedDescription) } - func dataDidChange() { + public func dataDidChange() { tableView.reloadData() } - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return selectArray.count } - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let user = selectArray[indexPath.row] let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "\(NSStringFromClass(QChatUserUnCheckCell.self))", for: indexPath) as? QChatUserUnCheckCell cell?.configure(user) return cell ?? UICollectionViewCell() } - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { let user = selectArray[indexPath.row] didUnselectContact(user) } - func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSize(width: 46, height: 52) } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return viewmodel.datas.count } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell: QChatSelectedCell = tableView.dequeueReusableCell(withIdentifier: "\(QChatSelectedCell.self)", for: indexPath) as! QChatSelectedCell let user = viewmodel.datas[indexPath.row] cell.user = user return cell } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 62 } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let user = viewmodel.datas[indexPath.row] let cell = tableView.cellForRow(at: indexPath) as? QChatSelectedCell @@ -241,7 +241,7 @@ extension QChatMemberSelectController: UICollectionViewDelegate, UICollectionVie } } - func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return 0 } diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatPermissionViewController.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatPermissionViewController.swift index acbf92ff..f5e67aa1 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatPermissionViewController.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatPermissionViewController.swift @@ -6,7 +6,7 @@ import UIKit import NEKitCoreIM typealias RoleUpdateCompletion = (_ role: ServerRole) -> Void -class QChatPermissionViewController: NEBaseTableViewController { +public class QChatPermissionViewController: NEBaseTableViewController { var idGroup: IdGroupModel? @@ -16,7 +16,7 @@ class QChatPermissionViewController: NEBaseTableViewController { var completion: RoleUpdateCompletion? - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -74,11 +74,11 @@ extension QChatPermissionViewController: UITableViewDelegate, UITableViewDataSou } } - func dataDidChange() { + public func dataDidChange() { tableView.reloadData() } - func dataDidError(_ error: Error) { + public func dataDidError(_ error: Error) { showToast(error.localizedDescription) } @@ -89,11 +89,11 @@ extension QChatPermissionViewController: UITableViewDelegate, UITableViewDataSou } } - func numberOfSections(in tableView: UITableView) -> Int { + public func numberOfSections(in tableView: UITableView) -> Int { return 5 } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if section == 0 { return 1 } @@ -115,7 +115,7 @@ extension QChatPermissionViewController: UITableViewDelegate, UITableViewDataSou return 0 } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if indexPath.section == 0 { let cell: QChatTextEditCell = tableView.dequeueReusableCell(withIdentifier: "\(QChatTextEditCell.self)", for: indexPath) as! QChatTextEditCell @@ -157,11 +157,11 @@ extension QChatPermissionViewController: UITableViewDelegate, UITableViewDataSou return UITableViewCell() } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 50 } - func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { let header = QChatHeaderView() switch section { case 0: @@ -188,14 +188,14 @@ extension QChatPermissionViewController: UITableViewDelegate, UITableViewDataSou return header } - func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { if let type = idGroup?.role?.type, type == .everyone, section == 1 { return 0 } return 40 } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.section == 1 { let memberManager = QChatMemberManagerController() diff --git a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatServerSettingViewController.swift b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatServerSettingViewController.swift index 6b31229d..407a2bcd 100644 --- a/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatServerSettingViewController.swift +++ b/NEKitQChat/NEKitQChatUI/NEKitQChatUI/Classes/Server/ViewController/QChatServerSettingViewController.swift @@ -10,7 +10,7 @@ import NIMSDK typealias SaveSuccessBlock = (_ server: QChatServer?) -> Void -class QChatServerSettingViewController: NEBaseTableViewController { +public class QChatServerSettingViewController: NEBaseTableViewController { let viewModel = SettingViewModel() var server: QChatServer? @@ -37,13 +37,13 @@ class QChatServerSettingViewController: NEBaseTableViewController { return label }() - override func viewWillAppear(_ animated: Bool) { + public override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) navigationController?.navigationBar.isHidden = false } - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -332,7 +332,7 @@ extension QChatServerSettingViewController { extension QChatServerSettingViewController: UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate { - func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { let l = textField.tag let text = "\(textField.text ?? "")\(string)" print("count : ", text.count) @@ -342,11 +342,11 @@ extension QChatServerSettingViewController: UITableViewDelegate, UITableViewData return true } - func numberOfSections(in tableView: UITableView) -> Int { + public func numberOfSections(in tableView: UITableView) -> Int { return 2 } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { print("count section : ", section) if section == 0 { return viewModel.permissions.count @@ -356,7 +356,7 @@ extension QChatServerSettingViewController: UITableViewDelegate, UITableViewData return 0 } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if indexPath.section == 0 { let textCell: QChatTextArrowCell = tableView.dequeueReusableCell(withIdentifier: "\(QChatTextArrowCell.self)", for: indexPath) as! QChatTextArrowCell @@ -376,7 +376,7 @@ extension QChatServerSettingViewController: UITableViewDelegate, UITableViewData return UITableViewCell() } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.section == 0 { if indexPath.row == 1 { @@ -409,7 +409,7 @@ extension QChatServerSettingViewController: UITableViewDelegate, UITableViewData } } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { if indexPath.section == 0 { return 48 }else if indexPath.section == 1 { @@ -418,21 +418,21 @@ extension QChatServerSettingViewController: UITableViewDelegate, UITableViewData return 0 } - func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { if section == 1 { return UIView(frame: CGRect(x: 0, y: 0, width: view.frame.size.width, height: 24)) } return nil } - func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { if section == 1 { return 24 } return 0 } - func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { return 0 } From faee2ea574b66cd0f141f8c6b95ab3d026748f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=96=84=E6=A0=8B?= Date: Thu, 26 May 2022 10:42:16 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=9B=BF=E6=8D=A2teamUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NEKitCommonUI/NEKitCommonUI.podspec | 2 +- .../Setting/TeamAvatarViewController.swift | 12 ++++---- .../Setting/TeamInfoViewController.swift | 14 ++++----- .../Setting/TeamIntroduceViewController.swift | 8 ++--- .../Setting/TeamMembersController.swift | 12 ++++---- .../Setting/TeamNameViewController.swift | 6 ++-- .../Setting/TeamSettingViewController.swift | 30 +++++++++---------- 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/NEKitCommon/NEKitCommonUI/NEKitCommonUI.podspec b/NEKitCommon/NEKitCommonUI/NEKitCommonUI.podspec index 726f3b23..340ec6e7 100644 --- a/NEKitCommon/NEKitCommonUI/NEKitCommonUI.podspec +++ b/NEKitCommon/NEKitCommonUI/NEKitCommonUI.podspec @@ -39,7 +39,7 @@ TODO: Add long description of the pod here. # s.public_header_files = 'Pod/Classes/**/*.h' # s.frameworks = 'UIKit', 'MapKit' - # s.dependency 'AFNetworking', '~> 2.3' + s.dependency 'Alamofire', '4.9.1' s.dependency 'NECommonKit' s.dependency 'Toast-Swift' s.dependency 'SDWebImage' diff --git a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamAvatarViewController.swift b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamAvatarViewController.swift index 9419e08c..26cc862e 100644 --- a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamAvatarViewController.swift +++ b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamAvatarViewController.swift @@ -7,7 +7,7 @@ import NEKitCommonUI import NIMSDK import NEKitTeam -class TeamAvatarViewController: NEBaseViewController { +public class TeamAvatarViewController: NEBaseViewController { typealias SaveCompletion = () -> Void @@ -43,7 +43,7 @@ class TeamAvatarViewController: NEBaseViewController { return collection }() - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() setupUI() } @@ -204,11 +204,11 @@ extension TeamAvatarViewController { extension TeamAvatarViewController: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout { - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 5 } - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { if let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "\(TeamDefaultIconCell.self)", for: indexPath) as? TeamDefaultIconCell { cell.iconImage.image = coreLoader.loadImage("icon_\(indexPath.row)") @@ -217,14 +217,14 @@ extension TeamAvatarViewController: UICollectionViewDelegate, UICollectionViewDa return UICollectionViewCell() } - func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { + public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { let space = (self.view.width - 297.0)/4.0 print("mini inter : ", space) return space } - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { if TeamRouter.iconUrls.count > indexPath.row { headerUrl = TeamRouter.iconUrls[indexPath.row] //headerView.image = coreLoader.loadImage("icon_\(indexPath.row)") diff --git a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamInfoViewController.swift b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamInfoViewController.swift index aa98e706..b432c586 100644 --- a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamInfoViewController.swift +++ b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamInfoViewController.swift @@ -5,7 +5,7 @@ import UIKit import NIMSDK -class TeamInfoViewController: NEBaseViewController { +public class TeamInfoViewController: NEBaseViewController { let viewmodel = TeamInfoViewModel() @@ -26,7 +26,7 @@ class TeamInfoViewController: NEBaseViewController { return table }() - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -68,11 +68,11 @@ class TeamInfoViewController: NEBaseViewController { extension TeamInfoViewController: UITableViewDelegate, UITableViewDataSource { - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return viewmodel.cellDatas.count } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let model = viewmodel.cellDatas[indexPath.row] if let cell = tableView.dequeueReusableCell(withIdentifier: "\(model.type)", for: indexPath) as? BaseTeamSettingCell { cell.configure(model) @@ -81,7 +81,7 @@ extension TeamInfoViewController: UITableViewDelegate, UITableViewDataSource { return UITableViewCell() } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if indexPath.row == 0 { let avatar = TeamAvatarViewController() avatar.team = team @@ -105,12 +105,12 @@ extension TeamInfoViewController: UITableViewDelegate, UITableViewDataSource { } } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { let model = viewmodel.cellDatas[indexPath.row] return model.rowHeight } - func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return 12.0 } diff --git a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamIntroduceViewController.swift b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamIntroduceViewController.swift index 0e7e6ca4..df5ed164 100644 --- a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamIntroduceViewController.swift +++ b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamIntroduceViewController.swift @@ -7,7 +7,7 @@ import NEKitCommon import NIMSDK import NEKitTeam -class TeamIntroduceViewController: NEBaseViewController { +public class TeamIntroduceViewController: NEBaseViewController { // typealias SaveCompletion = () -> Void // @@ -36,7 +36,7 @@ class TeamIntroduceViewController: NEBaseViewController { return label }() - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -139,14 +139,14 @@ class TeamIntroduceViewController: NEBaseViewController { extension TeamIntroduceViewController: UITextViewDelegate { - func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { + public func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { let currentText = textView.text ?? "" guard let stringRange = Range(range, in: currentText) else { return false } let updatedText = currentText.replacingCharacters(in: stringRange, with: text) return updatedText.count <= 100 } - func textViewDidChange(_ textView: UITextView) { + public func textViewDidChange(_ textView: UITextView) { if var text = textView.text { if let lang = textView.textInputMode?.primaryLanguage, lang == "zh-Hans", let selectRange = textView.markedTextRange { let position = textView.position(from: selectRange.start, offset: 0) diff --git a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamMembersController.swift b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamMembersController.swift index 831c3b57..52d17843 100644 --- a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamMembersController.swift +++ b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamMembersController.swift @@ -8,7 +8,7 @@ import NEKitCore // -class TeamMembersController: NEBaseViewController { +public class TeamMembersController: NEBaseViewController { var datas: [TeamMemberInfoModel]? @@ -47,7 +47,7 @@ class TeamMembersController: NEBaseViewController { return table }() - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. @@ -174,14 +174,14 @@ extension TeamMembersController: UITableViewDelegate, UITableViewDataSource { return datas?[index] } - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if let text = searchTextField.text, text.count > 0 { return searchDatas.count } return datas?.count ?? 0 } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { if let cell = tableView.dequeueReusableCell(withIdentifier: "\(TeamMemberCell.self)", for: indexPath) as? TeamMemberCell { if let model = getRealModel(indexPath.row){ cell.configure(model) @@ -192,11 +192,11 @@ extension TeamMembersController: UITableViewDelegate, UITableViewDataSource { return UITableViewCell() } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 62.0 } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if let model = getRealModel(indexPath.row), let user = model.nimUser { if CoreKitIMEngine.instance.isMySelf(user.userId) { Router.shared.use(MeSetting, parameters: ["nav": navigationController as Any], closure: nil) diff --git a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamNameViewController.swift b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamNameViewController.swift index 8c39942d..fa147965 100644 --- a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamNameViewController.swift +++ b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamNameViewController.swift @@ -11,7 +11,7 @@ enum ChangeType { case TeamName case NickName } -class TeamNameViewController: NEBaseViewController { +public class TeamNameViewController: NEBaseViewController { var team: NIMTeam? // var user: NIMUser? @@ -38,7 +38,7 @@ class TeamNameViewController: NEBaseViewController { return text }() - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() setupUI() } @@ -158,7 +158,7 @@ class TeamNameViewController: NEBaseViewController { extension TeamNameViewController: UITextFieldDelegate { - func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { if let text = (textField.text as NSString?)?.replacingCharacters(in: range, with: string), text.count > 30 { return false diff --git a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamSettingViewController.swift b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamSettingViewController.swift index d0162878..46fb4b9a 100644 --- a/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamSettingViewController.swift +++ b/NEKitTeam/NEKitTeamUI/NEKitTeamUI/Classes/Setting/TeamSettingViewController.swift @@ -7,7 +7,7 @@ import NEKitCommonUI import NEKitCoreIM import NIMSDK -class TeamSettingViewController: NEBaseViewController { +public class TeamSettingViewController: NEBaseViewController { let viewmodel = TeamSettingViewModel() @@ -79,7 +79,7 @@ class TeamSettingViewController: NEBaseViewController { return button }() - override func viewWillAppear(_ animated: Bool) { + public override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) if let model = viewmodel.teamInfoModel { if let url = model.team?.avatarUrl { @@ -91,7 +91,7 @@ class TeamSettingViewController: NEBaseViewController { } } - override func viewDidLoad() { + public override func viewDidLoad() { super.viewDidLoad() title = localizable("setting") weak var weakSelf = self @@ -473,12 +473,12 @@ extension TeamSettingViewController { extension TeamSettingViewController: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout { - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { print("numberOfItemsInSection ",viewmodel.teamInfoModel?.users.count as Any) return viewmodel.teamInfoModel?.users.count ?? 0 } - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { if let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "\(TeamUserCell.self)", for: indexPath) as? TeamUserCell { if let user = viewmodel.teamInfoModel?.users[indexPath.row] { cell.user = user @@ -488,11 +488,11 @@ extension TeamSettingViewController: UICollectionViewDelegate, UICollectionViewD return UICollectionViewCell() } - func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSize(width: 47.0, height: 32) } - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { if let member = viewmodel.teamInfoModel?.users[indexPath.row], let nimUser = member.nimUser{ let user = User(user:nimUser) if CoreKitIMEngine.instance.isMySelf(user.userId) { @@ -508,7 +508,7 @@ extension TeamSettingViewController: UICollectionViewDelegate, UICollectionViewD extension TeamSettingViewController: UITableViewDataSource, UITableViewDelegate { - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if viewmodel.sectionData.count > section { let model = viewmodel.sectionData[section] return model.cellModels.count @@ -516,11 +516,11 @@ extension TeamSettingViewController: UITableViewDataSource, UITableViewDelegate return 0 } - func numberOfSections(in tableView: UITableView) -> Int { + public func numberOfSections(in tableView: UITableView) -> Int { return viewmodel.sectionData.count } - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let model = viewmodel.sectionData[indexPath.section].cellModels[indexPath.row] if let cell = tableView.dequeueReusableCell(withIdentifier: "\(model.type)", for: indexPath) as? BaseTeamSettingCell { cell.configure(model) @@ -529,7 +529,7 @@ extension TeamSettingViewController: UITableViewDataSource, UITableViewDelegate return UITableViewCell() } - func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let model = viewmodel.sectionData[indexPath.section].cellModels[indexPath.row] if let block = model.cellClick { @@ -538,12 +538,12 @@ extension TeamSettingViewController: UITableViewDataSource, UITableViewDelegate } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { let model = viewmodel.sectionData[indexPath.section].cellModels[indexPath.row] return model.rowHeight } - func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { if viewmodel.sectionData.count > section { let model = viewmodel.sectionData[section] @@ -554,13 +554,13 @@ extension TeamSettingViewController: UITableViewDataSource, UITableViewDelegate return 0 } - func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { let header = UIView() header.backgroundColor = NEConstant.hexRGB(0xF1F1F6) return header } - func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { + public func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { if section == viewmodel.sectionData.count - 1 { return 12.0 } From 58cce09b6470b2ef5a752da2ce7afb67e3378c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=96=84=E6=A0=8B?= Date: Thu, 26 May 2022 10:56:11 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9pod=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Podfile b/Podfile index af3eb27a..95c1a2d2 100644 --- a/Podfile +++ b/Podfile @@ -7,11 +7,11 @@ target 'app' do pod 'YXLogin', '1.0.0' - pod 'NEContactUIKit', '9.0.1' - pod 'NEQChatUIKit', '9.0.1' - pod 'NEConversationUIKit', '9.0.1' - pod 'NEChatUIKit', '9.0.1' - pod 'NETeamUIKit', '9.0.1' + pod 'NEContactUIKit', '9.0.2-beta2' + pod 'NEQChatUIKit', '9.0.2-beta2' + pod 'NEConversationUIKit', '9.0.2-beta2' + pod 'NEChatUIKit', '9.0.2-beta2' + pod 'NETeamUIKit', '9.0.2-beta2' # 如果需要查看UI部分源码请注释掉以上在线依赖,打开下面的本地依赖 # pod 'NEChatKit', '9.0.1'