Skip to content

Commit

Permalink
修复tabbarItem显示位置不正确的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaselAn committed May 17, 2017
1 parent 7e24aff commit 91a4f18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ACBadge.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'ACBadge'
s.version = '1.2.5'
s.version = '1.2.6'
s.summary = 'Swift3.0版未读红点'
s.homepage = 'https://github.com/ChaselAn/ACBadge'
s.license = 'MIT'
Expand Down
2 changes: 1 addition & 1 deletion ACBadge/UIView+ACBadge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ extension UIView {
ac_badge!.frame.size.width = ac_badge!.frame.size.height
}
layoutIfNeeded()
if let superView = superview {
if let superView = superview, tag != UITabBarItem.ac_imgViewTag {
superView.layoutIfNeeded()
ac_badge!.center = CGPoint(x: frame.maxX + ac_badgeCenterOffset.x, y: frame.origin.y + ac_badgeCenterOffset.y)
} else {
Expand Down
2 changes: 1 addition & 1 deletion ACBadgeDemo/ACBadgeDemo/ACBadge/UIView+ACBadge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ extension UIView {
ac_badge!.frame.size.width = ac_badge!.frame.size.height
}
layoutIfNeeded()
if let superView = superview {
if let superView = superview, tag != UITabBarItem.ac_imgViewTag {
superView.layoutIfNeeded()
ac_badge!.center = CGPoint(x: frame.maxX + ac_badgeCenterOffset.x, y: frame.origin.y + ac_badgeCenterOffset.y)
} else {
Expand Down

0 comments on commit 91a4f18

Please sign in to comment.