Skip to content

Commit 211ed62

Browse files
author
pierremichel.villa
authored
Code refresh + SPM support (#848)
* SPM first attempt * upgrade Example project to XCode 11 * Upgrade to official FXPageControl package * Upgrade FXPageControl to 1.6
1 parent 8f35f96 commit 211ed62

27 files changed

+476
-224
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ playground.xcworkspace
5151

5252
Carthage/Build
5353

54-
.swift-version
54+
.swift-version
55+
.swiftpm/xcode

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Change Log
22
All notable changes to XLPagerTabStrip will be documented in this file.
33

4+
### [9.1.0](https://github.com/xmartlabs/XLPagerTabStrip/releases/tag/9.1.0)
5+
6+
* SPM support.
7+
48
### [9.0.0](https://github.com/xmartlabs/XLPagerTabStrip/releases/tag/9.0.0)
59

610
* Xcode 10.2 and Swift 5.0 support.

Example.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@
563563
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
564564
CLANG_ENABLE_MODULES = YES;
565565
INFOPLIST_FILE = "$(SRCROOT)/Example/Example/Info.plist";
566-
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
566+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
567567
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
568568
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.Example;
569569
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -580,7 +580,7 @@
580580
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
581581
CLANG_ENABLE_MODULES = YES;
582582
INFOPLIST_FILE = "$(SRCROOT)/Example/Example/Info.plist";
583-
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
583+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
584584
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
585585
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.Example;
586586
PRODUCT_NAME = "$(TARGET_NAME)";

Sources/FXPageControl.h renamed to ObjC/FXPageControl.h

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// FXPageControl.h
33
//
4-
// Version 1.4
4+
// Version 1.6
55
//
66
// Created by Nick Lockwood on 07/01/2010.
77
// Copyright 2010 Charcoal Design
@@ -31,18 +31,12 @@
3131
//
3232

3333

34-
#pragma GCC diagnostic push
35-
#pragma GCC diagnostic ignored "-Wobjc-missing-property-synthesis"
34+
#pragma clang diagnostic push
35+
#pragma clang diagnostic ignored "-Wobjc-missing-property-synthesis"
3636
#import <UIKit/UIKit.h>
3737

3838

39-
#import <Availability.h>
40-
#undef weak_delegate
41-
#if __has_feature(objc_arc_weak)
42-
#define weak_delegate weak
43-
#else
44-
#define weak_delegate unsafe_unretained
45-
#endif
39+
NS_ASSUME_NONNULL_BEGIN
4640

4741

4842
extern const CGPathRef FXPageControlDotShapeCircle;
@@ -59,7 +53,7 @@ IB_DESIGNABLE @interface FXPageControl : UIControl
5953
- (CGSize)sizeForNumberOfPages:(NSInteger)pageCount;
6054
- (void)updateCurrentPageDisplay;
6155

62-
@property (nonatomic, weak_delegate) IBOutlet id <FXPageControlDelegate> delegate;
56+
@property (nonatomic, weak) IBOutlet id <FXPageControlDelegate> delegate;
6357

6458
@property (nonatomic, assign) IBInspectable NSInteger currentPage;
6559
@property (nonatomic, assign) IBInspectable NSInteger numberOfPages;
@@ -68,21 +62,25 @@ IB_DESIGNABLE @interface FXPageControl : UIControl
6862
@property (nonatomic, assign, getter = isWrapEnabled) IBInspectable BOOL wrapEnabled;
6963
@property (nonatomic, assign, getter = isVertical) IBInspectable BOOL vertical;
7064

71-
@property (nonatomic, strong) IBInspectable UIImage *dotImage;
7265
@property (nonatomic, assign) IBInspectable CGPathRef dotShape;
7366
@property (nonatomic, assign) IBInspectable CGFloat dotSize;
74-
@property (nonatomic, strong) IBInspectable UIColor *dotColor;
75-
@property (nonatomic, strong) IBInspectable UIColor *dotShadowColor;
7667
@property (nonatomic, assign) IBInspectable CGFloat dotShadowBlur;
7768
@property (nonatomic, assign) IBInspectable CGSize dotShadowOffset;
69+
@property (nonatomic, assign) IBInspectable CGFloat dotBorderWidth;
70+
@property (nonatomic, strong, nullable) IBInspectable UIImage *dotImage;
71+
@property (nonatomic, strong, nullable) IBInspectable UIColor *dotColor;
72+
@property (nonatomic, strong, nullable) IBInspectable UIColor *dotShadowColor;
73+
@property (nonatomic, strong, nullable) IBInspectable UIColor *dotBorderColor;
7874

79-
@property (nonatomic, strong) IBInspectable UIImage *selectedDotImage;
8075
@property (nonatomic, assign) IBInspectable CGPathRef selectedDotShape;
8176
@property (nonatomic, assign) IBInspectable CGFloat selectedDotSize;
82-
@property (nonatomic, strong) IBInspectable UIColor *selectedDotColor;
83-
@property (nonatomic, strong) IBInspectable UIColor *selectedDotShadowColor;
8477
@property (nonatomic, assign) IBInspectable CGFloat selectedDotShadowBlur;
8578
@property (nonatomic, assign) IBInspectable CGSize selectedDotShadowOffset;
79+
@property (nonatomic, assign) IBInspectable CGFloat selectedDotBorderWidth;
80+
@property (nonatomic, strong, nullable) IBInspectable UIImage *selectedDotImage;
81+
@property (nonatomic, strong, nullable) IBInspectable UIColor *selectedDotColor;
82+
@property (nonatomic, strong, nullable) IBInspectable UIColor *selectedDotShadowColor;
83+
@property (nonatomic, strong, nullable) IBInspectable UIColor *selectedDotBorderColor;
8684

8785
@property (nonatomic, assign) IBInspectable CGFloat dotSpacing;
8886

@@ -92,15 +90,18 @@ IB_DESIGNABLE @interface FXPageControl : UIControl
9290
@protocol FXPageControlDelegate <NSObject>
9391
@optional
9492

95-
- (UIImage *)pageControl:(FXPageControl *)pageControl imageForDotAtIndex:(NSInteger)index;
93+
- (nullable UIImage *)pageControl:(FXPageControl *)pageControl imageForDotAtIndex:(NSInteger)index;
9694
- (CGPathRef)pageControl:(FXPageControl *)pageControl shapeForDotAtIndex:(NSInteger)index;
9795
- (UIColor *)pageControl:(FXPageControl *)pageControl colorForDotAtIndex:(NSInteger)index;
9896

99-
- (UIImage *)pageControl:(FXPageControl *)pageControl selectedImageForDotAtIndex:(NSInteger)index;
97+
- (nullable UIImage *)pageControl:(FXPageControl *)pageControl selectedImageForDotAtIndex:(NSInteger)index;
10098
- (CGPathRef)pageControl:(FXPageControl *)pageControl selectedShapeForDotAtIndex:(NSInteger)index;
10199
- (UIColor *)pageControl:(FXPageControl *)pageControl selectedColorForDotAtIndex:(NSInteger)index;
102100

103101
@end
104102

105103

106-
#pragma GCC diagnostic pop
104+
NS_ASSUME_NONNULL_END
105+
106+
107+
#pragma clang diagnostic pop

0 commit comments

Comments
 (0)