kevin vor 3 Jahren
Ursprung
Commit
1a5bb56b43

+ 6 - 0
appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift

@@ -34,6 +34,12 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
         
 //        navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(didTapCancel))
     }
+
+    public override func viewWillDisappear(_ animated: Bool) {
+        if ViewController.isExpandButton {
+            ViewController.expandButton()
+        }
+    }
     
     func makeMenu(){
         let isChangeProfile = UserDefaults.standard.bool(forKey: "is_change_profile")

+ 3 - 0
appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -308,6 +308,9 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate {
         tabBarController?.navigationItem.leftBarButtonItem = nil
         tabBarController?.navigationItem.searchController = nil
         tabBarController?.navigationItem.rightBarButtonItem = nil
+        if ViewController.isExpandButton {
+            ViewController.expandButton()
+        }
     }
     
     @objc func onReload(notification: NSNotification) {

+ 37 - 32
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -58,13 +58,13 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         self.delegate = self
         
         
-        firstTab?.tabBarItem.image = resizeImage(image: UIImage(named: "tab_1_icon")!, targetSize: CGSize(width: 25, height: 25)).withRenderingMode(.alwaysOriginal)
+        firstTab?.tabBarItem.image = resizeImage(image: UIImage(named: "tab_1_icon")!, targetSize: CGSize(width: 40, height: 40)).withRenderingMode(.alwaysOriginal)
         firstTab?.tabBarItem.imageInsets = UIEdgeInsets.init(top: 5,left: 0,bottom: -5,right: 0)
-        secondTab?.tabBarItem.image = resizeImage(image: UIImage(named: "tab_2_icon")!, targetSize: CGSize(width: 25, height: 25)).withRenderingMode(.alwaysOriginal)
+        secondTab?.tabBarItem.image = resizeImage(image: UIImage(named: "tab_2_icon")!, targetSize: CGSize(width: 40, height: 40)).withRenderingMode(.alwaysOriginal)
         secondTab?.tabBarItem.imageInsets = UIEdgeInsets.init(top: 5,left: 0,bottom: -5,right: 0)
-        thirdTab?.tabBarItem.image = resizeImage(image: UIImage(named: "tab_3_icon")!, targetSize: CGSize(width: 25, height: 25)).withRenderingMode(.alwaysOriginal)
+        thirdTab?.tabBarItem.image = resizeImage(image: UIImage(named: "tab_3_icon")!, targetSize: CGSize(width: 40, height: 40)).withRenderingMode(.alwaysOriginal)
         thirdTab?.tabBarItem.imageInsets = UIEdgeInsets.init(top: 5,left: 0,bottom: -5,right: 0)
-        fourthTab?.tabBarItem.image = resizeImage(image: UIImage(named: "tab_4_icon")!, targetSize: CGSize(width: 25, height: 25)).withRenderingMode(.alwaysOriginal)
+        fourthTab?.tabBarItem.image = resizeImage(image: UIImage(named: "tab_4_icon")!, targetSize: CGSize(width: 40, height: 40)).withRenderingMode(.alwaysOriginal)
         fourthTab?.tabBarItem.imageInsets = UIEdgeInsets.init(top: 5,left: 0,bottom: -5,right: 0)
         var i = 0
         var j = 0
@@ -140,14 +140,19 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
             self.tabBar.items?[2].isEnabled = false
         }
         let numberOfItems = CGFloat(tabBar.items!.count)
-        let tabBarItemSize = CGSize(width: tabBar.frame.width / numberOfItems, height: tabBar.frame.height)
+        let tabBarItemSize = CGSize(width: tabBar.frame.width / numberOfItems, height: 65)
         tabBar.selectionIndicatorImage = UIImage.imageWithColor(color: UIColor.grayColor, size: tabBarItemSize).resizableImage(withCapInsets: .zero)
         if Bundle.main.displayName == "DigiNetS" {
-            tabBar.barTintColor = .darkGray
             tabBar.selectionIndicatorImage = UIImage.imageWithColor(color: UIColor.gray, size: tabBarItemSize).resizableImage(withCapInsets: .zero)
         }
         UIFont.overrideInitialize()
     }
+
+    override func viewDidLayoutSubviews() {
+        super.viewDidLayoutSubviews()
+        tabBar.frame.size.height = 65
+        tabBar.frame.origin.y = view.frame.height - 65
+    }
     
     public static func checkIsChangePerson() -> Bool {
         let isChangeProfile = UserDefaults.standard.bool(forKey: "is_change_profile")
@@ -242,45 +247,45 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
     }
     
     func createMidFloatingButton(){
-        ViewController.chatButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 45, height: 45))
+        ViewController.chatButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 60, height: 60))
         ViewController.chatButton.setBackgroundImage(UIImage(named: "pb_button_chat", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
         ViewController.chatButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.chatButton.layer.shadowOpacity = 0.1
         ViewController.chatButton.layer.shadowOffset = CGSize(width: 4, height: 4)
         ViewController.chatButton.addTarget(self, action: #selector(chatTap), for: .touchUpInside)
 
-        ViewController.callButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 45, height: 45))
+        ViewController.callButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 60, height: 60))
         ViewController.callButton.setBackgroundImage(UIImage(named: "pb_button_call", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
         ViewController.callButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.callButton.layer.shadowOpacity = 0.1
         ViewController.callButton.layer.shadowOffset = CGSize(width: 4, height: 4)
         ViewController.callButton.addTarget(self, action: #selector(callTap), for: .touchUpInside)
 
-        ViewController.ccButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 45, height: 45))
+        ViewController.ccButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 60, height: 60))
         ViewController.ccButton.setBackgroundImage(UIImage(named: "pb_button_cc", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
         ViewController.ccButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.ccButton.layer.shadowOpacity = 0.1
         ViewController.ccButton.layer.shadowOffset = CGSize(width: 4, height: 4)
         ViewController.ccButton.addTarget(self, action: #selector(ccTap), for: .touchUpInside)
 
-        ViewController.streamingButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 45, height: 45))
+        ViewController.streamingButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 60, height: 60))
         ViewController.streamingButton.setBackgroundImage(UIImage(named: "pb_button_stream", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
         ViewController.streamingButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.streamingButton.layer.shadowOpacity = 0.1
         ViewController.streamingButton.layer.shadowOffset = CGSize(width: 4, height: 4)
         ViewController.streamingButton.addTarget(self, action: #selector(streamTap), for: .touchUpInside)
 
-        ViewController.postButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 45, height: 45))
+        ViewController.postButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 30 , y: self.view.bounds.height - 80, width: 60, height: 60))
         ViewController.postButton.setBackgroundImage(UIImage(named: "pb_button_post", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
         ViewController.postButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.postButton.layer.shadowOpacity = 0.1
         ViewController.postButton.layer.shadowOffset = CGSize(width: 4, height: 4)
         ViewController.postButton.addTarget(self, action: #selector(postTap), for: .touchUpInside)
         let buttonCenterX = self.view.bounds.width / 2
-        let buttonCenterY = self.view.bounds.height - self.tabBar.bounds.height
+        let buttonCenterY = self.view.bounds.height - 65
         print("buttonCenterX \(buttonCenterX)")
         print("buttonCenterY \(buttonCenterY)")
-        ViewController.middleButton = UIButton(frame: CGRect(x: buttonCenterX - 40 , y: buttonCenterY - 40, width: 80, height: 80))
+        ViewController.middleButton = UIButton(frame: CGRect(x: buttonCenterX - 50 , y: buttonCenterY - 55, width: 100, height: 100))
         ViewController.middleButton.setBackgroundImage(UIImage(named: "pb_button", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
         ViewController.middleButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.middleButton.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
@@ -292,8 +297,8 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         self.view.addSubview(ViewController.chatButton)
         self.view.addSubview(ViewController.callButton)
         self.view.addSubview(ViewController.ccButton)
-        self.view.addSubview(ViewController.streamingButton)
         self.view.addSubview(ViewController.postButton)
+        self.view.addSubview(ViewController.streamingButton)
         self.view.addSubview(ViewController.middleButton)
         
         ViewController.hideDockedButton()
@@ -489,20 +494,20 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         }
         if ViewController.isExpandButton {
             ViewController.isExpandButton = false
-            let xChatPosition = ViewController.chatButton.frame.origin.x + 80
-            let yChatPosition = ViewController.chatButton.frame.origin.y + 20
+            let xChatPosition = ViewController.chatButton.frame.origin.x + 120
+            let yChatPosition = ViewController.chatButton.frame.origin.y + 55
 
-            let xCallPosition = ViewController.callButton.frame.origin.x + 50
-            let yCallPosition = ViewController.callButton.frame.origin.y + 70
+            let xCallPosition = ViewController.callButton.frame.origin.x + 75
+            let yCallPosition = ViewController.callButton.frame.origin.y + 110
 
             let xCCPosition = ViewController.ccButton.frame.origin.x
-            let yCCPosition = ViewController.ccButton.frame.origin.y + 90
+            let yCCPosition = ViewController.ccButton.frame.origin.y + 135
 
-            let xPostPosition = ViewController.postButton.frame.origin.x - 50
-            let yPostPosition = ViewController.postButton.frame.origin.y + 70
+            let xPostPosition = ViewController.postButton.frame.origin.x - 75
+            let yPostPosition = ViewController.postButton.frame.origin.y + 110
 
-            let xStreamingPosition = ViewController.streamingButton.frame.origin.x - 80
-            let yStreamingPosition = ViewController.streamingButton.frame.origin.y + 20
+            let xStreamingPosition = ViewController.streamingButton.frame.origin.x - 120
+            let yStreamingPosition = ViewController.streamingButton.frame.origin.y + 55
             UIView.animate(withDuration: 0.5, animations: {
 //                if !ViewController.isBlue {
 //                    ViewController.middleButton.transform = CGAffineTransform(rotationAngle: 0)
@@ -521,20 +526,20 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         } else {
             ViewController.isExpandButton = true
             ViewController.showDockedButton()
-            let xChatPosition = ViewController.chatButton.frame.origin.x - 80
-            let yChatPosition = ViewController.chatButton.frame.origin.y - 20
+            let xChatPosition = ViewController.chatButton.frame.origin.x - 120
+            let yChatPosition = ViewController.chatButton.frame.origin.y - 55
 
-            let xCallPosition = ViewController.callButton.frame.origin.x - 50
-            let yCallPosition = ViewController.callButton.frame.origin.y - 70
+            let xCallPosition = ViewController.callButton.frame.origin.x - 75
+            let yCallPosition = ViewController.callButton.frame.origin.y - 110
 
             let xCCPosition = ViewController.ccButton.frame.origin.x
-            let yCCPosition = ViewController.ccButton.frame.origin.y - 90
+            let yCCPosition = ViewController.ccButton.frame.origin.y - 135
 
-            let xPostPosition = ViewController.postButton.frame.origin.x + 50
-            let yPostPosition = ViewController.postButton.frame.origin.y - 70
+            let xPostPosition = ViewController.postButton.frame.origin.x + 75
+            let yPostPosition = ViewController.postButton.frame.origin.y - 110
 
-            let xStreamingPosition = ViewController.streamingButton.frame.origin.x + 80
-            let yStreamingPosition = ViewController.streamingButton.frame.origin.y - 20
+            let xStreamingPosition = ViewController.streamingButton.frame.origin.x + 120
+            let yStreamingPosition = ViewController.streamingButton.frame.origin.y - 55
             UIView.animate(withDuration: 0.5, animations: {
 //                if !ViewController.isBlue{
 //                    ViewController.middleButton.transform = CGAffineTransform(rotationAngle: .pi / 2)