Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Sources/AZTabBarController/AZTabBarButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import EasyNotificationBadge
import UIKit

public class AZTabBarButton: UIButton{
open class AZTabBarButton: UIButton{

var longClickTimer: Timer?

Expand Down Expand Up @@ -88,7 +88,7 @@ public class AZTabBarButton: UIButton{
}


override public func layoutSubviews() {
override open func layoutSubviews() {

if didAddBadge{
super.layoutSubviews()
Expand All @@ -115,7 +115,7 @@ public class AZTabBarButton: UIButton{
}


override init(frame: CGRect) {
public override init(frame: CGRect) {
super.init(frame: frame)
centerTitleLabel()
}
Expand Down
9 changes: 7 additions & 2 deletions Sources/AZTabBarController/AZTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ open class AZTabBarController: UIViewController {
/// Is the tab bar in the middle of an animation.
fileprivate (set) open var isAnimating: Bool = false

open var tabButtonActionAnimated: Bool? = nil

/// If the separator line view that is between the buttons container and the primary view container is visable.
open var separatorLineVisible:Bool = true{
didSet{
Expand Down Expand Up @@ -807,7 +809,7 @@ open class AZTabBarController: UIViewController {
* MARK: - Actions
*/

@objc func tabButtonAction(button:UIButton){
@objc open func tabButtonAction(button:UIButton){
if let index = self.buttons.firstIndex(of: button){
delegate?.tabBar(self, didSelectTabAtIndex: index)

Expand Down Expand Up @@ -956,7 +958,7 @@ open class AZTabBarController: UIViewController {
}
}

private func createButton(forIndex index:Int)-> UIButton{
open func createButton(forIndex index:Int)-> UIButton{
let button = AZTabBarButton(type: .custom)
button.setTitle(" ", for: [])
button.delegate = self
Expand Down Expand Up @@ -1120,6 +1122,9 @@ extension AZTabBarController: AZTabBarButtonDelegate{
}

public func shouldAnimate(_ tabBarButton: AZTabBarButton) -> Bool {
if let animated = tabButtonActionAnimated {
return animated
}
if tabBarButton.tag == selectedIndex || self.highlightedButtonIndexes.contains(tabBarButton.tag) || isAnimating{
return false
}
Expand Down