Skip to content

Commit 2ba23c5

Browse files
committed
Version 2.3.4
1 parent e329cea commit 2ba23c5

11 files changed

Lines changed: 92 additions & 62 deletions

File tree

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
*xcuserdata/
3+
*.mode1v3
4+
*.pbxuser
5+
*.xcworkspace
6+
.build

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Gradient View.xcodeproj/project.pbxproj

Lines changed: 51 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
21392843248808D30009AFBF /* GradientView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2139283E248808D20009AFBF /* GradientView.h */; settings = {ATTRIBUTES = (Public, ); }; };
11+
21392844248808D30009AFBF /* GradientView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2139283E248808D20009AFBF /* GradientView.h */; settings = {ATTRIBUTES = (Public, ); }; };
12+
21392847248808D30009AFBF /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21392842248808D20009AFBF /* GradientView.swift */; };
13+
21392848248808D30009AFBF /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21392842248808D20009AFBF /* GradientView.swift */; };
1014
2163B9FC1A25FBF000610B0C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2163B9FB1A25FBF000610B0C /* AppDelegate.swift */; };
1115
2163B9FE1A25FBF000610B0C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2163B9FD1A25FBF000610B0C /* ViewController.swift */; };
1216
2163BA031A25FBF000610B0C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2163BA021A25FBF000610B0C /* Images.xcassets */; };
1317
2163BA061A25FBF000610B0C /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2163BA041A25FBF000610B0C /* LaunchScreen.xib */; };
14-
2163BA251A25FBFD00610B0C /* GradientView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2163BA241A25FBFD00610B0C /* GradientView.h */; settings = {ATTRIBUTES = (Public, ); }; };
1518
2163BA371A25FBFD00610B0C /* GradientView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2163BA201A25FBFD00610B0C /* GradientView.framework */; };
1619
2163BA381A25FBFD00610B0C /* GradientView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2163BA201A25FBFD00610B0C /* GradientView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17-
21AF9C3E1A25FC210086CB01 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21AF9C3D1A25FC210086CB01 /* GradientView.swift */; };
18-
21F917412013E3CD00B52603 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21AF9C3D1A25FC210086CB01 /* GradientView.swift */; };
19-
21F917422013E3D100B52603 /* GradientView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2163BA241A25FBFD00610B0C /* GradientView.h */; settings = {ATTRIBUTES = (Public, ); }; };
2020
21F917562013E67300B52603 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2163B9FB1A25FBF000610B0C /* AppDelegate.swift */; };
2121
21F917572013E67300B52603 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2163B9FD1A25FBF000610B0C /* ViewController.swift */; };
2222
21F917582013E67600B52603 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2163BA021A25FBF000610B0C /* Images.xcassets */; };
@@ -67,16 +67,16 @@
6767
/* End PBXCopyFilesBuildPhase section */
6868

6969
/* Begin PBXFileReference section */
70+
2139283E248808D20009AFBF /* GradientView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GradientView.h; sourceTree = "<group>"; };
71+
2139283F248808D20009AFBF /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
72+
21392842248808D20009AFBF /* GradientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = "<group>"; };
7073
2163B9F61A25FBF000610B0C /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
7174
2163B9FA1A25FBF000610B0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7275
2163B9FB1A25FBF000610B0C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7376
2163B9FD1A25FBF000610B0C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
7477
2163BA021A25FBF000610B0C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
7578
2163BA051A25FBF000610B0C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
7679
2163BA201A25FBFD00610B0C /* GradientView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GradientView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
77-
2163BA231A25FBFD00610B0C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
78-
2163BA241A25FBFD00610B0C /* GradientView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GradientView.h; sourceTree = "<group>"; };
79-
21AF9C3D1A25FC210086CB01 /* GradientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = "<group>"; };
8080
21F917392013E39000B52603 /* GradientView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GradientView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8181
21F917472013E59000B52603 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
8282
/* End PBXFileReference section */
@@ -115,11 +115,37 @@
115115
/* End PBXFrameworksBuildPhase section */
116116

117117
/* Begin PBXGroup section */
118+
2139283D248808D20009AFBF /* Support */ = {
119+
isa = PBXGroup;
120+
children = (
121+
2139283E248808D20009AFBF /* GradientView.h */,
122+
2139283F248808D20009AFBF /* Info.plist */,
123+
);
124+
path = Support;
125+
sourceTree = "<group>";
126+
};
127+
21392840248808D20009AFBF /* Sources */ = {
128+
isa = PBXGroup;
129+
children = (
130+
21392841248808D20009AFBF /* GradientView */,
131+
);
132+
path = Sources;
133+
sourceTree = "<group>";
134+
};
135+
21392841248808D20009AFBF /* GradientView */ = {
136+
isa = PBXGroup;
137+
children = (
138+
21392842248808D20009AFBF /* GradientView.swift */,
139+
);
140+
path = GradientView;
141+
sourceTree = "<group>";
142+
};
118143
2163B9ED1A25FBF000610B0C = {
119144
isa = PBXGroup;
120145
children = (
146+
21392840248808D20009AFBF /* Sources */,
147+
2139283D248808D20009AFBF /* Support */,
121148
2163B9F81A25FBF000610B0C /* Example */,
122-
2163BA211A25FBFD00610B0C /* GradientView */,
123149
2163B9F71A25FBF000610B0C /* Products */,
124150
21F9175C2013E69700B52603 /* Frameworks */,
125151
);
@@ -156,24 +182,6 @@
156182
name = "Supporting Files";
157183
sourceTree = "<group>";
158184
};
159-
2163BA211A25FBFD00610B0C /* GradientView */ = {
160-
isa = PBXGroup;
161-
children = (
162-
2163BA241A25FBFD00610B0C /* GradientView.h */,
163-
21AF9C3D1A25FC210086CB01 /* GradientView.swift */,
164-
2163BA221A25FBFD00610B0C /* Supporting Files */,
165-
);
166-
path = GradientView;
167-
sourceTree = "<group>";
168-
};
169-
2163BA221A25FBFD00610B0C /* Supporting Files */ = {
170-
isa = PBXGroup;
171-
children = (
172-
2163BA231A25FBFD00610B0C /* Info.plist */,
173-
);
174-
name = "Supporting Files";
175-
sourceTree = "<group>";
176-
};
177185
21F9175C2013E69700B52603 /* Frameworks */ = {
178186
isa = PBXGroup;
179187
children = (
@@ -188,15 +196,15 @@
188196
isa = PBXHeadersBuildPhase;
189197
buildActionMask = 2147483647;
190198
files = (
191-
2163BA251A25FBFD00610B0C /* GradientView.h in Headers */,
199+
21392843248808D30009AFBF /* GradientView.h in Headers */,
192200
);
193201
runOnlyForDeploymentPostprocessing = 0;
194202
};
195203
21F917362013E39000B52603 /* Headers */ = {
196204
isa = PBXHeadersBuildPhase;
197205
buildActionMask = 2147483647;
198206
files = (
199-
21F917422013E3D100B52603 /* GradientView.h in Headers */,
207+
21392844248808D30009AFBF /* GradientView.h in Headers */,
200208
);
201209
runOnlyForDeploymentPostprocessing = 0;
202210
};
@@ -314,6 +322,7 @@
314322
developmentRegion = English;
315323
hasScannedForEncodings = 0;
316324
knownRegions = (
325+
English,
317326
en,
318327
Base,
319328
);
@@ -378,15 +387,15 @@
378387
isa = PBXSourcesBuildPhase;
379388
buildActionMask = 2147483647;
380389
files = (
381-
21AF9C3E1A25FC210086CB01 /* GradientView.swift in Sources */,
390+
21392847248808D30009AFBF /* GradientView.swift in Sources */,
382391
);
383392
runOnlyForDeploymentPostprocessing = 0;
384393
};
385394
21F917342013E39000B52603 /* Sources */ = {
386395
isa = PBXSourcesBuildPhase;
387396
buildActionMask = 2147483647;
388397
files = (
389-
21F917412013E3CD00B52603 /* GradientView.swift in Sources */,
398+
21392848248808D30009AFBF /* GradientView.swift in Sources */,
390399
);
391400
runOnlyForDeploymentPostprocessing = 0;
392401
};
@@ -537,6 +546,7 @@
537546
2163BA161A25FBF000610B0C /* Debug */ = {
538547
isa = XCBuildConfiguration;
539548
buildSettings = {
549+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
540550
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
541551
CODE_SIGN_STYLE = Manual;
542552
DEVELOPMENT_TEAM = "";
@@ -553,6 +563,7 @@
553563
2163BA171A25FBF000610B0C /* Release */ = {
554564
isa = XCBuildConfiguration;
555565
buildSettings = {
566+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
556567
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
557568
CODE_SIGN_STYLE = Manual;
558569
DEVELOPMENT_TEAM = "";
@@ -581,9 +592,10 @@
581592
"DEBUG=1",
582593
"$(inherited)",
583594
);
584-
INFOPLIST_FILE = GradientView/Info.plist;
595+
INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist";
585596
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
586597
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
598+
MARKETING_VERSION = 2.3.4;
587599
MODULE_NAME = "com.samsoffes.gradient-view";
588600
MODULE_VERSION = "$(CURRENT_PROJECT_VERSION)";
589601
ONLY_ACTIVE_ARCH = YES;
@@ -608,9 +620,10 @@
608620
DYLIB_COMPATIBILITY_VERSION = 8;
609621
DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)";
610622
DYLIB_INSTALL_NAME_BASE = "@rpath";
611-
INFOPLIST_FILE = GradientView/Info.plist;
623+
INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist";
612624
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
613625
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
626+
MARKETING_VERSION = 2.3.4;
614627
MODULE_NAME = "com.samsoffes.gradient-view";
615628
MODULE_VERSION = "$(CURRENT_PROJECT_VERSION)";
616629
PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.gradient-view";
@@ -625,6 +638,7 @@
625638
21F9173F2013E39000B52603 /* Debug */ = {
626639
isa = XCBuildConfiguration;
627640
buildSettings = {
641+
APPLICATION_EXTENSION_API_ONLY = YES;
628642
CLANG_ANALYZER_NONNULL = YES;
629643
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
630644
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -640,7 +654,7 @@
640654
DYLIB_CURRENT_VERSION = 1;
641655
DYLIB_INSTALL_NAME_BASE = "@rpath";
642656
GCC_C_LANGUAGE_STANDARD = gnu11;
643-
INFOPLIST_FILE = GradientView/Info.plist;
657+
INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist";
644658
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
645659
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
646660
PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.gradient-view";
@@ -658,6 +672,7 @@
658672
21F917402013E39000B52603 /* Release */ = {
659673
isa = XCBuildConfiguration;
660674
buildSettings = {
675+
APPLICATION_EXTENSION_API_ONLY = YES;
661676
CLANG_ANALYZER_NONNULL = YES;
662677
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
663678
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -674,7 +689,7 @@
674689
DYLIB_CURRENT_VERSION = 1;
675690
DYLIB_INSTALL_NAME_BASE = "@rpath";
676691
GCC_C_LANGUAGE_STANDARD = gnu11;
677-
INFOPLIST_FILE = GradientView/Info.plist;
692+
INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist";
678693
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
679694
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
680695
PRODUCT_BUNDLE_IDENTIFIER = "com.samsoffes.gradient-view";
@@ -691,6 +706,7 @@
691706
21F917542013E59000B52603 /* Debug */ = {
692707
isa = XCBuildConfiguration;
693708
buildSettings = {
709+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
694710
CLANG_ANALYZER_NONNULL = YES;
695711
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
696712
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -715,6 +731,7 @@
715731
21F917552013E59000B52603 /* Release */ = {
716732
isa = XCBuildConfiguration;
717733
buildSettings = {
734+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
718735
CLANG_ANALYZER_NONNULL = YES;
719736
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
720737
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";

Gradient View.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

GradientView.podspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'GradientView'
3-
spec.version = '2.3.3'
3+
spec.version = '2.3.4'
44
spec.authors = {'Sam Soffes' => 'sam@soff.es'}
55
spec.homepage = 'https://github.com/soffes/GradientView'
66
spec.summary = 'Easily use gradients in UIKit.'
77
spec.description = 'Gradient View is a simple UIView wrapper around CGGradient.'
88
spec.source = {:git => 'https://github.com/soffes/GradientView.git', :tag => "v#{spec.version}"}
99
spec.license = { :type => 'MIT', :file => 'LICENSE' }
1010

11+
spec.swift_versions = ['5.0', '5.2']
1112
spec.ios.deployment_target = '8.0'
1213
spec.tvos.deployment_target = '9.0'
1314

1415
spec.frameworks = 'UIKit'
15-
spec.source_files = 'GradientView/**/*.{h,m,swift}'
16+
spec.source_files = 'Sources/GradientView/**/*.swift'
1617
end

Package.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// swift-tools-version:5.2
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "GradientView",
7+
products: [
8+
.library(name: "GradientView", targets: ["GradientView"])
9+
],
10+
targets: [
11+
.target(name: "GradientView")
12+
]
13+
)

Readme.markdown

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
Easily use gradients in UIKit. Gradient View is a simple UIView wrapper around CGGradient.
44

55
[![Version](https://img.shields.io/github/release/soffes/GradientView.svg)](https://github.com/soffes/GradientView/releases)
6-
![Swift Version](https://img.shields.io/badge/swift-4.0-orange.svg)
76
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
87
[![CocoaPods compatible](https://img.shields.io/cocoapods/v/GradientView.svg)](https://cocoapods.org/pods/GradientView)
98

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
//
2-
// GradientView.swift
3-
// Gradient View
4-
//
5-
// Created by Sam Soffes on 10/27/09.
6-
// Copyright (c) 2009-2014 Sam Soffes. All rights reserved.
7-
//
8-
91
import UIKit
102

113
/// Simple view for drawing gradients and borders.
@@ -22,7 +14,6 @@ import UIKit
2214
case radial
2315
}
2416

25-
2617
/// The direction of the gradient.
2718
@objc public enum Direction: Int {
2819
/// The gradient is vertical.
@@ -32,7 +23,6 @@ import UIKit
3223
case horizontal
3324
}
3425

35-
3626
// MARK: - Properties
3727

3828
/// An optional array of `UIColor` objects used to draw the gradient. If the value is `nil`, the `backgroundColor`
@@ -120,7 +110,6 @@ import UIKit
120110
}
121111
}
122112

123-
124113
// MARK: - UIView
125114

126115
override open func draw(_ rect: CGRect) {
@@ -185,12 +174,11 @@ import UIKit
185174
contentMode = .redraw
186175
}
187176

188-
189177
// MARK: - Private
190178

191-
fileprivate var gradient: CGGradient?
179+
private var gradient: CGGradient?
192180

193-
fileprivate func updateGradient() {
181+
private func updateGradient() {
194182
gradient = nil
195183
setNeedsDisplay()
196184

@@ -221,7 +209,7 @@ import UIKit
221209
}
222210
}
223211

224-
fileprivate func gradientColors() -> [UIColor]? {
212+
private func gradientColors() -> [UIColor]? {
225213
if tintAdjustmentMode == .dimmed {
226214
if let dimmedColors = dimmedColors {
227215
return dimmedColors
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
//
2-
// GradientView.h
3-
// GradientView
4-
//
5-
// Created by Sam Soffes on 11/26/14.
6-
// Copyright (c) 2014 Sam Soffes. All rights reserved.
7-
//
8-
91
@import Foundation;
102

113
//! Project version number for GradientView.

0 commit comments

Comments
 (0)