diff --git a/FSPagerView/FSPagerView.xcodeproj/project.pbxproj b/FSPagerView/FSPagerView.xcodeproj/project.pbxproj index e1df11f..323fc65 100644 --- a/FSPagerView/FSPagerView.xcodeproj/project.pbxproj +++ b/FSPagerView/FSPagerView.xcodeproj/project.pbxproj @@ -302,7 +302,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSPagerView; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -322,7 +322,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSPagerView; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/FSPagerViewExample-Objc/FSPagerViewExample-Objc.xcodeproj/project.pbxproj b/FSPagerViewExample-Objc/FSPagerViewExample-Objc.xcodeproj/project.pbxproj index 91b15e8..6aa7c4c 100644 --- a/FSPagerViewExample-Objc/FSPagerViewExample-Objc.xcodeproj/project.pbxproj +++ b/FSPagerViewExample-Objc/FSPagerViewExample-Objc.xcodeproj/project.pbxproj @@ -257,12 +257,14 @@ F9C694481E40C6C1007084B6 = { CreatedOnToolsVersion = 8.2.1; DevelopmentTeam = HZF422TY46; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; TestTargetID = F9EC37181E304A830022B6D6; }; F9EC37181E304A830022B6D6 = { CreatedOnToolsVersion = 8.2.1; DevelopmentTeam = HZF422TY46; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; }; }; @@ -384,7 +386,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TEST_TARGET_NAME = "FSPagerViewExample-Objc"; }; name = Debug; @@ -400,7 +403,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.wenchaod.FSPagerViewExample-ObjcUITests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TEST_TARGET_NAME = "FSPagerViewExample-Objc"; }; name = Release; @@ -517,7 +521,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.wenchaod.FSPagerView-Objc"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -530,7 +535,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.wenchaod.FSPagerView-Objc"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/Sources/FSPageViewTransformer.swift b/Sources/FSPageViewTransformer.swift index 8a77c86..2878679 100644 --- a/Sources/FSPageViewTransformer.swift +++ b/Sources/FSPageViewTransformer.swift @@ -29,6 +29,7 @@ open class FSPagerViewTransformer: NSObject { open var minimumScale: CGFloat = 0.65 open var minimumAlpha: CGFloat = 0.6 + @objc public init(type: FSPagerViewTransformerType) { self.type = type switch type { diff --git a/Sources/FSPagerView.swift b/Sources/FSPagerView.swift index 2be9eca..6e3af53 100644 --- a/Sources/FSPagerView.swift +++ b/Sources/FSPagerView.swift @@ -162,6 +162,7 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega } /// The transformer of the pager view. + @objc open var transformer: FSPagerViewTransformer? { didSet { self.transformer?.pagerView = self diff --git a/Sources/FSPagerViewCell.swift b/Sources/FSPagerViewCell.swift index ea862d3..286eb38 100644 --- a/Sources/FSPagerViewCell.swift +++ b/Sources/FSPagerViewCell.swift @@ -11,6 +11,7 @@ import UIKit open class FSPagerViewCell: UICollectionViewCell { /// Returns the label used for the main textual content of the pager view cell. + @objc open var textLabel: UILabel? { if let _ = _textLabel { return _textLabel @@ -32,6 +33,7 @@ open class FSPagerViewCell: UICollectionViewCell { } /// Returns the image view of the pager view cell. Default is nil. + @objc open var imageView: UIImageView? { if let _ = _imageView { return _imageView