Skip to content

Commit

Permalink
Version 2.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
soffes committed Jun 3, 2020
1 parent e329cea commit 2ba23c5
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 62 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
*xcuserdata/
*.mode1v3
*.pbxuser
*.xcworkspace
.build
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

85 changes: 51 additions & 34 deletions Gradient View.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -67,16 +67,16 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
2139283E248808D20009AFBF /* GradientView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GradientView.h; sourceTree = "<group>"; };
2139283F248808D20009AFBF /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
21392842248808D20009AFBF /* GradientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = "<group>"; };
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 = "<group>"; };
2163B9FB1A25FBF000610B0C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2163B9FD1A25FBF000610B0C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
2163BA021A25FBF000610B0C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
2163BA051A25FBF000610B0C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
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 = "<group>"; };
2163BA241A25FBFD00610B0C /* GradientView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GradientView.h; sourceTree = "<group>"; };
21AF9C3D1A25FC210086CB01 /* GradientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = "<group>"; };
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 */
Expand Down Expand Up @@ -115,11 +115,37 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
2139283D248808D20009AFBF /* Support */ = {
isa = PBXGroup;
children = (
2139283E248808D20009AFBF /* GradientView.h */,
2139283F248808D20009AFBF /* Info.plist */,
);
path = Support;
sourceTree = "<group>";
};
21392840248808D20009AFBF /* Sources */ = {
isa = PBXGroup;
children = (
21392841248808D20009AFBF /* GradientView */,
);
path = Sources;
sourceTree = "<group>";
};
21392841248808D20009AFBF /* GradientView */ = {
isa = PBXGroup;
children = (
21392842248808D20009AFBF /* GradientView.swift */,
);
path = GradientView;
sourceTree = "<group>";
};
2163B9ED1A25FBF000610B0C = {
isa = PBXGroup;
children = (
21392840248808D20009AFBF /* Sources */,
2139283D248808D20009AFBF /* Support */,
2163B9F81A25FBF000610B0C /* Example */,
2163BA211A25FBFD00610B0C /* GradientView */,
2163B9F71A25FBF000610B0C /* Products */,
21F9175C2013E69700B52603 /* Frameworks */,
);
Expand Down Expand Up @@ -156,24 +182,6 @@
name = "Supporting Files";
sourceTree = "<group>";
};
2163BA211A25FBFD00610B0C /* GradientView */ = {
isa = PBXGroup;
children = (
2163BA241A25FBFD00610B0C /* GradientView.h */,
21AF9C3D1A25FC210086CB01 /* GradientView.swift */,
2163BA221A25FBFD00610B0C /* Supporting Files */,
);
path = GradientView;
sourceTree = "<group>";
};
2163BA221A25FBFD00610B0C /* Supporting Files */ = {
isa = PBXGroup;
children = (
2163BA231A25FBFD00610B0C /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
21F9175C2013E69700B52603 /* Frameworks */ = {
isa = PBXGroup;
children = (
Expand All @@ -188,15 +196,15 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
2163BA251A25FBFD00610B0C /* GradientView.h in Headers */,
21392843248808D30009AFBF /* GradientView.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
21F917362013E39000B52603 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
21F917422013E3D100B52603 /* GradientView.h in Headers */,
21392844248808D30009AFBF /* GradientView.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -314,6 +322,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -378,15 +387,15 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
21AF9C3E1A25FC210086CB01 /* GradientView.swift in Sources */,
21392847248808D30009AFBF /* GradientView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
21F917342013E39000B52603 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
21F917412013E3CD00B52603 /* GradientView.swift in Sources */,
21392848248808D30009AFBF /* GradientView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -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 = "";
Expand All @@ -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 = "";
Expand Down Expand Up @@ -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;
Expand All @@ -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";
Expand All @@ -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";
Expand All @@ -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";
Expand All @@ -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";
Expand All @@ -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";
Expand All @@ -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";
Expand All @@ -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";
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
5 changes: 3 additions & 2 deletions GradientView.podspec
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
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.'
spec.description = 'Gradient View is a simple UIView wrapper around CGGradient.'
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
13 changes: 13 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -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")
]
)
1 change: 0 additions & 1 deletion Readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -22,7 +14,6 @@ import UIKit
case radial
}


/// The direction of the gradient.
@objc public enum Direction: Int {
/// The gradient is vertical.
Expand All @@ -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`
Expand Down Expand Up @@ -120,7 +110,6 @@ import UIKit
}
}


// MARK: - UIView

override open func draw(_ rect: CGRect) {
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -221,7 +209,7 @@ import UIKit
}
}

fileprivate func gradientColors() -> [UIColor]? {
private func gradientColors() -> [UIColor]? {
if tintAdjustmentMode == .dimmed {
if let dimmedColors = dimmedColors {
return dimmedColors
Expand Down
8 changes: 0 additions & 8 deletions GradientView/GradientView.h → Support/GradientView.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion GradientView/Info.plist → Support/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.3.3</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit 2ba23c5

Please sign in to comment.