diff --git a/ScrollPager.podspec b/ScrollPager.podspec index fafd3e4..065d37f 100644 --- a/ScrollPager.podspec +++ b/ScrollPager.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'ScrollPager' - s.version = '0.6' + s.version = '0.7' s.summary = 'A fully featured scroll pager similar to the one in flipboard, fully configurable through storyboard' s.homepage = 'https://github.com/aryaxt/ScrollPager' s.license = { @@ -8,7 +8,7 @@ Pod::Spec.new do |s| :file => 'License.txt' } s.author = {'Aryan Ghassemi' => 'https://github.com/aryaxt/ScrollPager'} - s.source = {:git => 'https://github.com/aryaxt/ScrollPager.git', :tag => '0.6'} + s.source = {:git => 'https://github.com/aryaxt/ScrollPager.git', :tag => '0.7'} s.platform = :ios, '8.0' s.source_files = 'ScrollPager/Source/*.{swift}' s.framework = 'Foundation', 'UIKit' diff --git a/ScrollPager/Source/ScrollPager.swift b/ScrollPager/Source/ScrollPager.swift index 8136f8a..110f7d3 100644 --- a/ScrollPager/Source/ScrollPager.swift +++ b/ScrollPager/Source/ScrollPager.swift @@ -155,13 +155,15 @@ import UIKit } private func addViews(segmentViews: [UIView]) { - for view in scrollView!.subviews { + guard let scrollView = scrollView else { fatalError("trying to add views but the scrollView is nil") } + + for view in scrollView.subviews { view.removeFromSuperview() } for i in 0..