From 2ba23c51b7a4d55ee732379eb0eb35987a773185 Mon Sep 17 00:00:00 2001 From: Sam Soffes Date: Wed, 3 Jun 2020 09:37:56 -0700 Subject: [PATCH] Version 2.3.4 --- .gitignore | 6 ++ .swift-version | 1 - Gradient View.xcodeproj/project.pbxproj | 85 +++++++++++-------- .../contents.xcworkspacedata | 7 ++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++ GradientView.podspec | 5 +- Package.swift | 13 +++ Readme.markdown | 1 - .../GradientView}/GradientView.swift | 18 +--- {GradientView => Support}/GradientView.h | 8 -- {GradientView => Support}/Info.plist | 2 +- 11 files changed, 92 insertions(+), 62 deletions(-) create mode 100644 .gitignore delete mode 100644 .swift-version create mode 100644 Gradient View.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Gradient View.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Package.swift rename {GradientView => Sources/GradientView}/GradientView.swift (95%) rename {GradientView => Support}/GradientView.h (62%) rename {GradientView => Support}/Info.plist (95%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..338c036 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +*xcuserdata/ +*.mode1v3 +*.pbxuser +*.xcworkspace +.build diff --git a/.swift-version b/.swift-version deleted file mode 100644 index bf77d54..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4.2 diff --git a/Gradient View.xcodeproj/project.pbxproj b/Gradient View.xcodeproj/project.pbxproj index 63b9ec8..0092308 100644 --- a/Gradient View.xcodeproj/project.pbxproj +++ b/Gradient View.xcodeproj/project.pbxproj @@ -7,16 +7,16 @@ objects = { /* Begin PBXBuildFile section */ + 21392843248808D30009AFBF /* GradientView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2139283E248808D20009AFBF /* GradientView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21392844248808D30009AFBF /* GradientView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2139283E248808D20009AFBF /* GradientView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21392847248808D30009AFBF /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21392842248808D20009AFBF /* GradientView.swift */; }; + 21392848248808D30009AFBF /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21392842248808D20009AFBF /* GradientView.swift */; }; 2163B9FC1A25FBF000610B0C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2163B9FB1A25FBF000610B0C /* AppDelegate.swift */; }; 2163B9FE1A25FBF000610B0C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2163B9FD1A25FBF000610B0C /* ViewController.swift */; }; 2163BA031A25FBF000610B0C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2163BA021A25FBF000610B0C /* Images.xcassets */; }; 2163BA061A25FBF000610B0C /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2163BA041A25FBF000610B0C /* LaunchScreen.xib */; }; - 2163BA251A25FBFD00610B0C /* GradientView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2163BA241A25FBFD00610B0C /* GradientView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2163BA371A25FBFD00610B0C /* GradientView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2163BA201A25FBFD00610B0C /* GradientView.framework */; }; 2163BA381A25FBFD00610B0C /* GradientView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2163BA201A25FBFD00610B0C /* GradientView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 21AF9C3E1A25FC210086CB01 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21AF9C3D1A25FC210086CB01 /* GradientView.swift */; }; - 21F917412013E3CD00B52603 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21AF9C3D1A25FC210086CB01 /* GradientView.swift */; }; - 21F917422013E3D100B52603 /* GradientView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2163BA241A25FBFD00610B0C /* GradientView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21F917562013E67300B52603 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2163B9FB1A25FBF000610B0C /* AppDelegate.swift */; }; 21F917572013E67300B52603 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2163B9FD1A25FBF000610B0C /* ViewController.swift */; }; 21F917582013E67600B52603 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2163BA021A25FBF000610B0C /* Images.xcassets */; }; @@ -67,6 +67,9 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 2139283E248808D20009AFBF /* GradientView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GradientView.h; sourceTree = ""; }; + 2139283F248808D20009AFBF /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 21392842248808D20009AFBF /* GradientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = ""; }; 2163B9F61A25FBF000610B0C /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 2163B9FA1A25FBF000610B0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 2163B9FB1A25FBF000610B0C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -74,9 +77,6 @@ 2163BA021A25FBF000610B0C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 2163BA051A25FBF000610B0C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 2163BA201A25FBFD00610B0C /* GradientView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GradientView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2163BA231A25FBFD00610B0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2163BA241A25FBFD00610B0C /* GradientView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GradientView.h; sourceTree = ""; }; - 21AF9C3D1A25FC210086CB01 /* GradientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = ""; }; 21F917392013E39000B52603 /* GradientView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GradientView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 21F917472013E59000B52603 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -115,11 +115,37 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 2139283D248808D20009AFBF /* Support */ = { + isa = PBXGroup; + children = ( + 2139283E248808D20009AFBF /* GradientView.h */, + 2139283F248808D20009AFBF /* Info.plist */, + ); + path = Support; + sourceTree = ""; + }; + 21392840248808D20009AFBF /* Sources */ = { + isa = PBXGroup; + children = ( + 21392841248808D20009AFBF /* GradientView */, + ); + path = Sources; + sourceTree = ""; + }; + 21392841248808D20009AFBF /* GradientView */ = { + isa = PBXGroup; + children = ( + 21392842248808D20009AFBF /* GradientView.swift */, + ); + path = GradientView; + sourceTree = ""; + }; 2163B9ED1A25FBF000610B0C = { isa = PBXGroup; children = ( + 21392840248808D20009AFBF /* Sources */, + 2139283D248808D20009AFBF /* Support */, 2163B9F81A25FBF000610B0C /* Example */, - 2163BA211A25FBFD00610B0C /* GradientView */, 2163B9F71A25FBF000610B0C /* Products */, 21F9175C2013E69700B52603 /* Frameworks */, ); @@ -156,24 +182,6 @@ name = "Supporting Files"; sourceTree = ""; }; - 2163BA211A25FBFD00610B0C /* GradientView */ = { - isa = PBXGroup; - children = ( - 2163BA241A25FBFD00610B0C /* GradientView.h */, - 21AF9C3D1A25FC210086CB01 /* GradientView.swift */, - 2163BA221A25FBFD00610B0C /* Supporting Files */, - ); - path = GradientView; - sourceTree = ""; - }; - 2163BA221A25FBFD00610B0C /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 2163BA231A25FBFD00610B0C /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; 21F9175C2013E69700B52603 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -188,7 +196,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2163BA251A25FBFD00610B0C /* GradientView.h in Headers */, + 21392843248808D30009AFBF /* GradientView.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -196,7 +204,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 21F917422013E3D100B52603 /* GradientView.h in Headers */, + 21392844248808D30009AFBF /* GradientView.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -314,6 +322,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -378,7 +387,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 21AF9C3E1A25FC210086CB01 /* GradientView.swift in Sources */, + 21392847248808D30009AFBF /* GradientView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -386,7 +395,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 21F917412013E3CD00B52603 /* GradientView.swift in Sources */, + 21392848248808D30009AFBF /* GradientView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -537,6 +546,7 @@ 2163BA161A25FBF000610B0C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; @@ -553,6 +563,7 @@ 2163BA171A25FBF000610B0C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; @@ -581,9 +592,10 @@ "DEBUG=1", "$(inherited)", ); - INFOPLIST_FILE = GradientView/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 2.3.4; MODULE_NAME = "com.samsoffes.gradient-view"; MODULE_VERSION = "$(CURRENT_PROJECT_VERSION)"; ONLY_ACTIVE_ARCH = YES; @@ -608,9 +620,10 @@ DYLIB_COMPATIBILITY_VERSION = 8; DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = GradientView/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 2.3.4; MODULE_NAME = "com.samsoffes.gradient-view"; MODULE_VERSION = "$(CURRENT_PROJECT_VERSION)"; PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.gradient-view"; @@ -625,6 +638,7 @@ 21F9173F2013E39000B52603 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -640,7 +654,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = GradientView/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.gradient-view"; @@ -658,6 +672,7 @@ 21F917402013E39000B52603 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -674,7 +689,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = GradientView/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.gradient-view"; @@ -691,6 +706,7 @@ 21F917542013E59000B52603 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -715,6 +731,7 @@ 21F917552013E59000B52603 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; diff --git a/Gradient View.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Gradient View.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Gradient View.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Gradient View.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Gradient View.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Gradient View.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/GradientView.podspec b/GradientView.podspec index d390f46..b949a80 100644 --- a/GradientView.podspec +++ b/GradientView.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'GradientView' - spec.version = '2.3.3' + spec.version = '2.3.4' spec.authors = {'Sam Soffes' => 'sam@soff.es'} spec.homepage = 'https://github.com/soffes/GradientView' spec.summary = 'Easily use gradients in UIKit.' @@ -8,9 +8,10 @@ Pod::Spec.new do |spec| spec.source = {:git => 'https://github.com/soffes/GradientView.git', :tag => "v#{spec.version}"} spec.license = { :type => 'MIT', :file => 'LICENSE' } + spec.swift_versions = ['5.0', '5.2'] spec.ios.deployment_target = '8.0' spec.tvos.deployment_target = '9.0' spec.frameworks = 'UIKit' - spec.source_files = 'GradientView/**/*.{h,m,swift}' + spec.source_files = 'Sources/GradientView/**/*.swift' end diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..8745e41 --- /dev/null +++ b/Package.swift @@ -0,0 +1,13 @@ +// swift-tools-version:5.2 + +import PackageDescription + +let package = Package( + name: "GradientView", + products: [ + .library(name: "GradientView", targets: ["GradientView"]) + ], + targets: [ + .target(name: "GradientView") + ] +) diff --git a/Readme.markdown b/Readme.markdown index fc1dbf6..4df77be 100644 --- a/Readme.markdown +++ b/Readme.markdown @@ -3,7 +3,6 @@ Easily use gradients in UIKit. Gradient View is a simple UIView wrapper around CGGradient. [![Version](https://img.shields.io/github/release/soffes/GradientView.svg)](https://github.com/soffes/GradientView/releases) -![Swift Version](https://img.shields.io/badge/swift-4.0-orange.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPods compatible](https://img.shields.io/cocoapods/v/GradientView.svg)](https://cocoapods.org/pods/GradientView) diff --git a/GradientView/GradientView.swift b/Sources/GradientView/GradientView.swift similarity index 95% rename from GradientView/GradientView.swift rename to Sources/GradientView/GradientView.swift index c6a627e..581060e 100644 --- a/GradientView/GradientView.swift +++ b/Sources/GradientView/GradientView.swift @@ -1,11 +1,3 @@ -// -// GradientView.swift -// Gradient View -// -// Created by Sam Soffes on 10/27/09. -// Copyright (c) 2009-2014 Sam Soffes. All rights reserved. -// - import UIKit /// Simple view for drawing gradients and borders. @@ -22,7 +14,6 @@ import UIKit case radial } - /// The direction of the gradient. @objc public enum Direction: Int { /// The gradient is vertical. @@ -32,7 +23,6 @@ import UIKit case horizontal } - // MARK: - Properties /// An optional array of `UIColor` objects used to draw the gradient. If the value is `nil`, the `backgroundColor` @@ -120,7 +110,6 @@ import UIKit } } - // MARK: - UIView override open func draw(_ rect: CGRect) { @@ -185,12 +174,11 @@ import UIKit contentMode = .redraw } - // MARK: - Private - fileprivate var gradient: CGGradient? + private var gradient: CGGradient? - fileprivate func updateGradient() { + private func updateGradient() { gradient = nil setNeedsDisplay() @@ -221,7 +209,7 @@ import UIKit } } - fileprivate func gradientColors() -> [UIColor]? { + private func gradientColors() -> [UIColor]? { if tintAdjustmentMode == .dimmed { if let dimmedColors = dimmedColors { return dimmedColors diff --git a/GradientView/GradientView.h b/Support/GradientView.h similarity index 62% rename from GradientView/GradientView.h rename to Support/GradientView.h index 175cf1a..e8aeae9 100644 --- a/GradientView/GradientView.h +++ b/Support/GradientView.h @@ -1,11 +1,3 @@ -// -// GradientView.h -// GradientView -// -// Created by Sam Soffes on 11/26/14. -// Copyright (c) 2014 Sam Soffes. All rights reserved. -// - @import Foundation; //! Project version number for GradientView. diff --git a/GradientView/Info.plist b/Support/Info.plist similarity index 95% rename from GradientView/Info.plist rename to Support/Info.plist index ce6c96b..ca23c84 100644 --- a/GradientView/Info.plist +++ b/Support/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.3.3 + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion