Skip to content

Commit

Permalink
Merge pull request #229 from khoren93/master
Browse files Browse the repository at this point in the history
Fix crash when tab bar items count is 0, and selected icon color bug for some  animation types.
  • Loading branch information
0ber authored Jul 12, 2018
2 parents af732e1 + e89ed59 commit 0ef38b8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ open class RAMFumeAnimation: RAMItemAnimation {
if let iconImage = icon.image {
let renderImage = iconImage.withRenderingMode(.alwaysTemplate)
icon.image = renderImage
icon.tintColor = textSelectedColor
icon.tintColor = iconSelectedColor
}
}

Expand Down Expand Up @@ -82,7 +82,7 @@ open class RAMFumeAnimation: RAMItemAnimation {
if let iconImage = icon.image {
let renderImage = iconImage.withRenderingMode(.alwaysTemplate)
icon.image = renderImage
icon.tintColor = textSelectedColor
icon.tintColor = iconSelectedColor
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ open class RAMRotationAnimation: RAMItemAnimation {
if let iconImage = icon.image {
let renderImage = iconImage.withRenderingMode(.alwaysTemplate)
icon.image = renderImage
icon.tintColor = textSelectedColor
icon.tintColor = iconSelectedColor
}
}

Expand Down Expand Up @@ -111,18 +111,18 @@ open class RAMRotationAnimation: RAMItemAnimation {
}

/// The RAMLeftRotationAnimation class provides letf rotation animation.
class RAMLeftRotationAnimation: RAMRotationAnimation {
open class RAMLeftRotationAnimation: RAMRotationAnimation {

override init() {
public override init() {
super.init()
direction = RAMRotationDirection.left
}
}

/// The RAMRightRotationAnimation class provides rigth rotation animation.
class RAMRightRotationAnimation: RAMRotationAnimation {
open class RAMRightRotationAnimation: RAMRotationAnimation {

override init() {
public override init() {
super.init()
direction = RAMRotationDirection.right
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,36 +92,36 @@ open class RAMTransitionItemAnimations: RAMItemAnimation {
}
}

class RAMFlipLeftTransitionItemAnimations: RAMTransitionItemAnimations {
open class RAMFlipLeftTransitionItemAnimations: RAMTransitionItemAnimations {

override init() {
public override init() {
super.init()

transitionOptions = UIViewAnimationOptions.transitionFlipFromLeft
}
}

class RAMFlipRightTransitionItemAnimations: RAMTransitionItemAnimations {
open class RAMFlipRightTransitionItemAnimations: RAMTransitionItemAnimations {

override init() {
public override init() {
super.init()

transitionOptions = UIViewAnimationOptions.transitionFlipFromRight
}
}

class RAMFlipTopTransitionItemAnimations: RAMTransitionItemAnimations {
open class RAMFlipTopTransitionItemAnimations: RAMTransitionItemAnimations {

override init() {
public override init() {
super.init()

transitionOptions = UIViewAnimationOptions.transitionFlipFromTop
}
}

class RAMFlipBottomTransitionItemAnimations: RAMTransitionItemAnimations {
open class RAMFlipBottomTransitionItemAnimations: RAMTransitionItemAnimations {

override init() {
public override init() {
super.init()

transitionOptions = UIViewAnimationOptions.transitionFlipFromBottom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ open class RAMAnimatedTabBarController: UITabBarController {

fileprivate func createViewContainers() -> [String: UIView] {

guard let items = tabBar.items else {
guard let items = tabBar.items, items.count > 0 else {
return [:]
}

Expand Down

0 comments on commit 0ef38b8

Please sign in to comment.