27
+        }
28
+    }
29
+}

+ 0 - 18
PaiAi/PaiaiUIKit/Reusable/Extension/UIKit/UIViewController+UIBarButtonItem.swift

@@ -1,18 +0,0 @@
1
-//
2
-//  UIViewController+UIBarButtonItem.swift
3
-//  PaiAi
4
-//
5
-//  Created by mac on 16/7/21.
6
-//  Copyright © 2016年 FFIB. All rights reserved.
7
-//
8
-
9
-import UIKit
10
-
11
-public extension UIViewController {
12
-    func setRightBarButtonItem(image: UIImage?, action: Selector) {
13
-        let button = UIButton(type: .custom)
14
-        button.setImage(image, for: .normal)
15
-        button.addTarget(self, action: action, for: .touchDown)
16
-        navigationItem.rightBarButtonItem = UIBarButtonItem(customView: button)
17
-    }
18
-}

+ 1 - 1
PaiAi/PaiaiUIKit/Reusable/UIKit/NavigationBack/UINavigationController + NavigationBack.swift

@@ -1,5 +1,5 @@
1 1
 //
2
-//  UINavigationController + NavigationBack.swift
2
+//  UINavigationController+NavigationBack.swift
3 3
 //  PaiaiUIKit
4 4
 //
5 5
 //  Created by ffib on 2019/4/26.

+ 1 - 5
PaiAi/Paiai_iOS/App/ContainerViewController.swift

@@ -72,11 +72,7 @@ public final class ContainerViewController: PageViewController {
72 72
     func constructNavigationViewHierarchy() {
73 73
         navigationContentView.addSubview(iconView)
74 74
         navigationContentView.addSubview(headerView)
75
-        let leftItem = UIBarButtonItem(customView: navigationContentView)
76
-        let spaceItem = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil)
77
-        spaceItem.width = -15
78
-        
79
-        navigationItem.leftBarButtonItems = [spaceItem, leftItem]
75
+        navigationItem.setLeftItem(UIBarButtonItem(customView: navigationContentView))
80 76
     }
81 77
 }
82 78
 

+ 1 - 1
PaiAi/Paiai_iOS/App/Group/GroupDetail/GroupDetailViewController.swift

@@ -34,7 +34,7 @@ final class GroupDetailViewController: UIViewController {
34 34
     
35 35
     func setRightBarButtonItems() {
36 36
         let item = UIBarButtonItem(image: UIImage(named: "navigation-right"), target: self, action: #selector(quit))
37
-        navigationItem.rightBarButtonItem = item
37
+        navigationItem.setRightItem(item)
38 38
     }
39 39
     
40 40
     @objc func quit() {

+ 1 - 2
PaiAi/Paiai_iOS/App/Group/GroupViewController.swift

@@ -171,8 +171,7 @@ extension GroupViewController {
171 171
                                    targets: [self, viewModel!],
172 172
                                    actions: [#selector(GroupViewController.presentGroupQR),
173 173
                                              #selector(GroupViewModel.navigateToGroupDetail)])
174
-
175
-        navigationItem.rightBarButtonItem = item
174
+        navigationItem.setRightItem(item)
176 175
     }
177 176
     
178 177
     @objc func presentGroupQR() {

+ 2 - 1
PaiAi/Paiai_iOS/App/Message/MessageListViewController.swift

@@ -53,7 +53,8 @@ final class MessageListViewController: UIViewController {
53 53
     
54 54
     private func setupNavigationBar() {
55 55
         navigationItem.title = type.model.title
56
-        setRightBarButtonItem(image: UIImage.Navigation.right, action: #selector(clearMessage))
56
+        let rightItem = UIBarButtonItem(image: UIImage.Navigation.right, target: self, action: #selector(clearMessage))
57
+        navigationItem.setRightItem(rightItem)
57 58
     }
58 59
 
59 60
     private func setup() {

pai2 - Gogs: Go Git Service

拍爱

Brightcells: e440bc76ee Change to use pywe-oauth лет %!s(int64=9): %!d(string=назад)
..
migrations 8f43551640 add api wx_jsapi_signature_api лет %!s(int64=9): %!d(string=назад)
__init__.py 8f43551640 add api wx_jsapi_signature_api лет %!s(int64=9): %!d(string=назад)
admin.py 8f43551640 add api wx_jsapi_signature_api лет %!s(int64=9): %!d(string=назад)
models.py 8f43551640 add api wx_jsapi_signature_api лет %!s(int64=9): %!d(string=назад)
tests.py 8f43551640 add api wx_jsapi_signature_api лет %!s(int64=9): %!d(string=назад)
views.py e440bc76ee Change to use pywe-oauth лет %!s(int64=9): %!d(string=назад)