Skip to content

Commit

Permalink
Code refresh SPM support (#848)
Browse files Browse the repository at this point in the history
* SPM first attempt

* upgrade Example project to XCode 11

* Upgrade to official FXPageControl package

* Upgrade FXPageControl to 1.6
  • Loading branch information
Climbatize authored Jul 26, 2023
1 parent 8f35f96 commit 211ed62
Show file tree
Hide file tree
Showing 27 changed files with 476 additions and 224 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 51,5 @@ playground.xcworkspace

Carthage/Build

.swift-version
.swift-version
.swiftpm/xcode
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 1,10 @@
# Change Log
All notable changes to XLPagerTabStrip will be documented in this file.

### [9.1.0](https://github.com/xmartlabs/XLPagerTabStrip/releases/tag/9.1.0)

* SPM support.

### [9.0.0](https://github.com/xmartlabs/XLPagerTabStrip/releases/tag/9.0.0)

* Xcode 10.2 and Swift 5.0 support.
Expand Down
4 changes: 2 additions & 2 deletions Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 563,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = "$(SRCROOT)/Example/Example/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -580,7 580,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
INFOPLIST_FILE = "$(SRCROOT)/Example/Example/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
41 changes: 21 additions & 20 deletions Sources/FXPageControl.h → ObjC/FXPageControl.h
Original file line number Diff line number Diff line change
@@ -1,7 1,7 @@
//
// FXPageControl.h
//
// Version 1.4
// Version 1.6
//
// Created by Nick Lockwood on 07/01/2010.
// Copyright 2010 Charcoal Design
Expand Down Expand Up @@ -31,18 31,12 @@
//


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


#import <Availability.h>
#undef weak_delegate
#if __has_feature(objc_arc_weak)
#define weak_delegate weak
#else
#define weak_delegate unsafe_unretained
#endif
NS_ASSUME_NONNULL_BEGIN


extern const CGPathRef FXPageControlDotShapeCircle;
Expand All @@ -59,7 53,7 @@ IB_DESIGNABLE @interface FXPageControl : UIControl
- (CGSize)sizeForNumberOfPages:(NSInteger)pageCount;
- (void)updateCurrentPageDisplay;

@property (nonatomic, weak_delegate) IBOutlet id <FXPageControlDelegate> delegate;
@property (nonatomic, weak) IBOutlet id <FXPageControlDelegate> delegate;

@property (nonatomic, assign) IBInspectable NSInteger currentPage;
@property (nonatomic, assign) IBInspectable NSInteger numberOfPages;
Expand All @@ -68,21 62,25 @@ IB_DESIGNABLE @interface FXPageControl : UIControl
@property (nonatomic, assign, getter = isWrapEnabled) IBInspectable BOOL wrapEnabled;
@property (nonatomic, assign, getter = isVertical) IBInspectable BOOL vertical;

@property (nonatomic, strong) IBInspectable UIImage *dotImage;
@property (nonatomic, assign) IBInspectable CGPathRef dotShape;
@property (nonatomic, assign) IBInspectable CGFloat dotSize;
@property (nonatomic, strong) IBInspectable UIColor *dotColor;
@property (nonatomic, strong) IBInspectable UIColor *dotShadowColor;
@property (nonatomic, assign) IBInspectable CGFloat dotShadowBlur;
@property (nonatomic, assign) IBInspectable CGSize dotShadowOffset;
@property (nonatomic, assign) IBInspectable CGFloat dotBorderWidth;
@property (nonatomic, strong, nullable) IBInspectable UIImage *dotImage;
@property (nonatomic, strong, nullable) IBInspectable UIColor *dotColor;
@property (nonatomic, strong, nullable) IBInspectable UIColor *dotShadowColor;
@property (nonatomic, strong, nullable) IBInspectable UIColor *dotBorderColor;

@property (nonatomic, strong) IBInspectable UIImage *selectedDotImage;
@property (nonatomic, assign) IBInspectable CGPathRef selectedDotShape;
@property (nonatomic, assign) IBInspectable CGFloat selectedDotSize;
@property (nonatomic, strong) IBInspectable UIColor *selectedDotColor;
@property (nonatomic, strong) IBInspectable UIColor *selectedDotShadowColor;
@property (nonatomic, assign) IBInspectable CGFloat selectedDotShadowBlur;
@property (nonatomic, assign) IBInspectable CGSize selectedDotShadowOffset;
@property (nonatomic, assign) IBInspectable CGFloat selectedDotBorderWidth;
@property (nonatomic, strong, nullable) IBInspectable UIImage *selectedDotImage;
@property (nonatomic, strong, nullable) IBInspectable UIColor *selectedDotColor;
@property (nonatomic, strong, nullable) IBInspectable UIColor *selectedDotShadowColor;
@property (nonatomic, strong, nullable) IBInspectable UIColor *selectedDotBorderColor;

@property (nonatomic, assign) IBInspectable CGFloat dotSpacing;

Expand All @@ -92,15 90,18 @@ IB_DESIGNABLE @interface FXPageControl : UIControl
@protocol FXPageControlDelegate <NSObject>
@optional

- (UIImage *)pageControl:(FXPageControl *)pageControl imageForDotAtIndex:(NSInteger)index;
- (nullable UIImage *)pageControl:(FXPageControl *)pageControl imageForDotAtIndex:(NSInteger)index;
- (CGPathRef)pageControl:(FXPageControl *)pageControl shapeForDotAtIndex:(NSInteger)index;
- (UIColor *)pageControl:(FXPageControl *)pageControl colorForDotAtIndex:(NSInteger)index;

- (UIImage *)pageControl:(FXPageControl *)pageControl selectedImageForDotAtIndex:(NSInteger)index;
- (nullable UIImage *)pageControl:(FXPageControl *)pageControl selectedImageForDotAtIndex:(NSInteger)index;
- (CGPathRef)pageControl:(FXPageControl *)pageControl selectedShapeForDotAtIndex:(NSInteger)index;
- (UIColor *)pageControl:(FXPageControl *)pageControl selectedColorForDotAtIndex:(NSInteger)index;

@end


#pragma GCC diagnostic pop
NS_ASSUME_NONNULL_END


#pragma clang diagnostic pop
Loading

0 comments on commit 211ed62

Please sign in to comment.