pod spec update

This commit is contained in:
Eugene Pravda 2016-09-28 18:07:44 +03:00
parent 621957e338
commit cf206f8184
2 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |spec| Pod::Spec.new do |spec|
spec.name = "Segmentio" spec.name = "Segmentio"
spec.version = "1.1.1" spec.version = "1.1.2"
spec.homepage = "https://github.com/Yalantis/Segmentio" spec.homepage = "https://github.com/Yalantis/Segmentio"
spec.summary = "Animated top/bottom segmented control written in Swift!" spec.summary = "Animated top/bottom segmented control written in Swift!"

View File

@ -17,9 +17,14 @@ class BadgeWithCounterView: UIView {
class func instanceFromNib(size size: CounterBadgeSize) -> BadgeWithCounterView { class func instanceFromNib(size size: CounterBadgeSize) -> BadgeWithCounterView {
let nibName = nibNameForSize(size) let nibName = nibNameForSize(size)
return UINib(nibName: nibName, bundle: nil).instantiateWithOwner(nil, options: nil)[0] as! BadgeWithCounterView let podBundle = NSBundle(forClass: self.classForCoder())
if let bundleURL = podBundle.URLForResource("Segmentio", withExtension: "bundle"), bundle = NSBundle(URL: bundleURL) {
return UINib(nibName: nibName, bundle: bundle).instantiateWithOwner(nil, options: nil)[0] as! BadgeWithCounterView
}
return BadgeWithCounterView(frame: CGRectZero)
} }
func setBadgeCounterValue(counterValue: Int) { func setBadgeCounterValue(counterValue: Int) {
var counterText: String! var counterText: String!
if counterValue > BadgeCounterMaxValue { if counterValue > BadgeCounterMaxValue {