|
@@ -58,13 +58,13 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
|
|
self.delegate = self
|
|
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)
|
|
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)
|
|
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)
|
|
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)
|
|
fourthTab?.tabBarItem.imageInsets = UIEdgeInsets.init(top: 5,left: 0,bottom: -5,right: 0)
|
|
var i = 0
|
|
var i = 0
|
|
var j = 0
|
|
var j = 0
|
|
@@ -140,14 +140,19 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
|
|
self.tabBar.items?[2].isEnabled = false
|
|
self.tabBar.items?[2].isEnabled = false
|
|
}
|
|
}
|
|
let numberOfItems = CGFloat(tabBar.items!.count)
|
|
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)
|
|
tabBar.selectionIndicatorImage = UIImage.imageWithColor(color: UIColor.grayColor, size: tabBarItemSize).resizableImage(withCapInsets: .zero)
|
|
if Bundle.main.displayName == "DigiNetS" {
|
|
if Bundle.main.displayName == "DigiNetS" {
|
|
- tabBar.barTintColor = .darkGray
|
|
|
|
tabBar.selectionIndicatorImage = UIImage.imageWithColor(color: UIColor.gray, size: tabBarItemSize).resizableImage(withCapInsets: .zero)
|
|
tabBar.selectionIndicatorImage = UIImage.imageWithColor(color: UIColor.gray, size: tabBarItemSize).resizableImage(withCapInsets: .zero)
|
|
}
|
|
}
|
|
UIFont.overrideInitialize()
|
|
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 {
|
|
public static func checkIsChangePerson() -> Bool {
|
|
let isChangeProfile = UserDefaults.standard.bool(forKey: "is_change_profile")
|
|
let isChangeProfile = UserDefaults.standard.bool(forKey: "is_change_profile")
|
|
@@ -242,45 +247,45 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
|
|
}
|
|
}
|
|
|
|
|
|
func createMidFloatingButton(){
|
|
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.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.shadowColor = UIColor.black.cgColor
|
|
ViewController.chatButton.layer.shadowOpacity = 0.1
|
|
ViewController.chatButton.layer.shadowOpacity = 0.1
|
|
ViewController.chatButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
ViewController.chatButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
ViewController.chatButton.addTarget(self, action: #selector(chatTap), for: .touchUpInside)
|
|
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.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.shadowColor = UIColor.black.cgColor
|
|
ViewController.callButton.layer.shadowOpacity = 0.1
|
|
ViewController.callButton.layer.shadowOpacity = 0.1
|
|
ViewController.callButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
ViewController.callButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
ViewController.callButton.addTarget(self, action: #selector(callTap), for: .touchUpInside)
|
|
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.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.shadowColor = UIColor.black.cgColor
|
|
ViewController.ccButton.layer.shadowOpacity = 0.1
|
|
ViewController.ccButton.layer.shadowOpacity = 0.1
|
|
ViewController.ccButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
ViewController.ccButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
ViewController.ccButton.addTarget(self, action: #selector(ccTap), for: .touchUpInside)
|
|
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.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.shadowColor = UIColor.black.cgColor
|
|
ViewController.streamingButton.layer.shadowOpacity = 0.1
|
|
ViewController.streamingButton.layer.shadowOpacity = 0.1
|
|
ViewController.streamingButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
ViewController.streamingButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
ViewController.streamingButton.addTarget(self, action: #selector(streamTap), for: .touchUpInside)
|
|
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.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.shadowColor = UIColor.black.cgColor
|
|
ViewController.postButton.layer.shadowOpacity = 0.1
|
|
ViewController.postButton.layer.shadowOpacity = 0.1
|
|
ViewController.postButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
ViewController.postButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
ViewController.postButton.addTarget(self, action: #selector(postTap), for: .touchUpInside)
|
|
ViewController.postButton.addTarget(self, action: #selector(postTap), for: .touchUpInside)
|
|
let buttonCenterX = self.view.bounds.width / 2
|
|
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("buttonCenterX \(buttonCenterX)")
|
|
print("buttonCenterY \(buttonCenterY)")
|
|
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.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.shadowColor = UIColor.black.cgColor
|
|
ViewController.middleButton.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
|
|
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.chatButton)
|
|
self.view.addSubview(ViewController.callButton)
|
|
self.view.addSubview(ViewController.callButton)
|
|
self.view.addSubview(ViewController.ccButton)
|
|
self.view.addSubview(ViewController.ccButton)
|
|
- self.view.addSubview(ViewController.streamingButton)
|
|
|
|
self.view.addSubview(ViewController.postButton)
|
|
self.view.addSubview(ViewController.postButton)
|
|
|
|
+ self.view.addSubview(ViewController.streamingButton)
|
|
self.view.addSubview(ViewController.middleButton)
|
|
self.view.addSubview(ViewController.middleButton)
|
|
|
|
|
|
ViewController.hideDockedButton()
|
|
ViewController.hideDockedButton()
|
|
@@ -489,20 +494,20 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
|
|
}
|
|
}
|
|
if ViewController.isExpandButton {
|
|
if ViewController.isExpandButton {
|
|
ViewController.isExpandButton = false
|
|
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 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: {
|
|
UIView.animate(withDuration: 0.5, animations: {
|
|
// if !ViewController.isBlue {
|
|
// if !ViewController.isBlue {
|
|
// ViewController.middleButton.transform = CGAffineTransform(rotationAngle: 0)
|
|
// ViewController.middleButton.transform = CGAffineTransform(rotationAngle: 0)
|
|
@@ -521,20 +526,20 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
|
|
} else {
|
|
} else {
|
|
ViewController.isExpandButton = true
|
|
ViewController.isExpandButton = true
|
|
ViewController.showDockedButton()
|
|
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 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: {
|
|
UIView.animate(withDuration: 0.5, animations: {
|
|
// if !ViewController.isBlue{
|
|
// if !ViewController.isBlue{
|
|
// ViewController.middleButton.transform = CGAffineTransform(rotationAngle: .pi / 2)
|
|
// ViewController.middleButton.transform = CGAffineTransform(rotationAngle: .pi / 2)
|