From cf206f818408598c4dd61b43e9f68a54ed45185a Mon Sep 17 00:00:00 2001 From: Eugene Pravda Date: Wed, 28 Sep 2016 18:07:44 +0300 Subject: [PATCH] pod spec update --- Segmentio.podspec | 2 +- Segmentio/Source/Badge/Views/BadgeWithCounterView.swift | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Segmentio.podspec b/Segmentio.podspec index cedb202..0b7e6f1 100644 --- a/Segmentio.podspec +++ b/Segmentio.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "Segmentio" - spec.version = "1.1.1" + spec.version = "1.1.2" spec.homepage = "https://github.com/Yalantis/Segmentio" spec.summary = "Animated top/bottom segmented control written in Swift!" diff --git a/Segmentio/Source/Badge/Views/BadgeWithCounterView.swift b/Segmentio/Source/Badge/Views/BadgeWithCounterView.swift index 1bf4bfa..8d812d3 100644 --- a/Segmentio/Source/Badge/Views/BadgeWithCounterView.swift +++ b/Segmentio/Source/Badge/Views/BadgeWithCounterView.swift @@ -17,9 +17,14 @@ class BadgeWithCounterView: UIView { class func instanceFromNib(size size: CounterBadgeSize) -> BadgeWithCounterView { 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) { var counterText: String! if counterValue > BadgeCounterMaxValue {