2016-08-15 82 views

回答

1

試試這個:

tabBarItem.badgeValue = "<number_you_want>" 

tabBarItem是你的包項目。

+0

沒有使用tabBar – lordxxx

+0

如果你不使用tabbar,你必須在你的圖片右上角添加一個uiview,試試這個:https: //github.com/marketplacer/swift-badge –

+0

謝謝,我發現這個https://github.com/mustafaibrahim989/MIBadgeButton-Swift – lordxxx