File tree Expand file tree Collapse file tree 5 files changed +31
-23
lines changed
JXBanner/Classes/Banner/Banner Expand file tree Collapse file tree 5 files changed +31
-23
lines changed Original file line number Diff line number Diff line change 632632 PRODUCT_NAME = "$(TARGET_NAME)";
633633 PROVISIONING_PROFILE_SPECIFIER = "";
634634 SWIFT_SWIFT3_OBJC_INFERENCE = Default;
635- SWIFT_VERSION = 4 .0;
635+ SWIFT_VERSION = 5 .0;
636636 };
637637 name = Debug;
638638 };
652652 PRODUCT_NAME = "$(TARGET_NAME)";
653653 PROVISIONING_PROFILE_SPECIFIER = "";
654654 SWIFT_SWIFT3_OBJC_INFERENCE = Default;
655- SWIFT_VERSION = 4 .0;
655+ SWIFT_VERSION = 5 .0;
656656 };
657657 name = Release;
658658 };
Original file line number Diff line number Diff line change 22<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33<plist version =" 1.0" >
44<dict >
5- <key >NSAppTransportSecurity </key >
6- <dict >
7- <key >NSAllowsArbitraryLoads </key >
8- <true />
9- </dict >
105 <key >CFBundleDevelopmentRegion </key >
116 <string >en </string >
127 <key >CFBundleDisplayName </key >
2924 <string >1 </string >
3025 <key >LSRequiresIPhoneOS </key >
3126 <true />
27+ <key >NSAppTransportSecurity </key >
28+ <dict >
29+ <key >NSAllowsArbitraryLoads </key >
30+ <true />
31+ </dict >
3232 <key >UILaunchStoryboardName </key >
3333 <string >LaunchScreen </string >
3434 <key >UIMainStoryboardFile </key >
4141 <array >
4242 <string >UIInterfaceOrientationPortrait </string >
4343 <string >UIInterfaceOrientationLandscapeLeft </string >
44+ <string >UIInterfaceOrientationLandscapeRight </string >
4445 </array >
4546</dict >
4647</plist >
Original file line number Diff line number Diff line change 88
99Pod ::Spec . new do |s |
1010 s . name = 'JXBanner'
11- s . version = '0.3.1 '
11+ s . version = '0.3.2 '
1212 s . summary = 'A multifunctional framework for banner unlimited rollover diagrams'
1313
1414# This description is used to generate tags and improve search results.
Original file line number Diff line number Diff line change @@ -21,19 +21,28 @@ class JXBannerLayout: UICollectionViewFlowLayout {
2121 var params : JXBannerLayoutParams ? {
2222 didSet {
2323 if let params = params {
24+ shouldInvalidateLayout = true
2425 itemSize = params. itemSize ?? collectionView? . bounds. size ?? CGSize ( width: 2 , height: 2 )
2526 minimumLineSpacing = params. itemSpacing
2627 minimumInteritemSpacing = params. itemSpacing
2728 }
2829 }
2930 }
30-
31+
32+ /// Fixed cell offset bug: when XIB loaded JXBanner with Pagecount equal to 1
33+ var shouldInvalidateLayout = true
34+
3135 var isPagingEnabled : Bool = true
3236
3337 override func shouldInvalidateLayout( forBoundsChange newBounds: CGRect ) ->
3438 Bool {
35- if let _ = params? . layoutType { return true }
36- return super. shouldInvalidateLayout ( forBoundsChange: newBounds)
39+
40+ if shouldInvalidateLayout || params? . layoutType != nil {
41+ shouldInvalidateLayout = false
42+ return true
43+ }
44+
45+ return super. shouldInvalidateLayout ( forBoundsChange: newBounds)
3746 }
3847
3948 override func prepare( ) {
You can’t perform that action at this time.
0 commit comments