18 |
19 |
20 |
--------------------------------------------------------------------------------
/Sources/Randient/Extensions/UIColor+Analysis.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIColor+Analysis.swift
3 | // Randient
4 | //
5 | // Created by Merrick Sapsford on 18/09/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | internal extension UIColor {
12 |
13 | var isLight: Bool {
14 | guard let components = cgColor.components, components.count >= 3 else {
15 | return false
16 | }
17 | let brightness = ((components[0] * 299) + (components[1] * 587) + (components[2] * 114)) / 1000
18 | return brightness >= 0.5
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Sources/RandientTests/UIGradientMetadataTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIGradientMetadataTests.swift
3 | // RandientTests
4 | //
5 | // Created by Merrick Sapsford on 05/10/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import Randient
11 |
12 | class UIGradientMetadataTests: XCTestCase {
13 |
14 | func testIsLightAveraging() {
15 | for gradient in UIGradient.allCases {
16 | let lightColors = gradient.data.colors.filter({ $0.isLight })
17 | let darkColors = gradient.data.colors.filter({ !$0.isLight })
18 |
19 | let expectedIsLight = lightColors.count > darkColors.count
20 | XCTAssertEqual(expectedIsLight, gradient.metadata.isPredominantlyLight)
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Sources/RandientTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Sources/Randient/Views/GradientView+UIGradient.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GradientView+UIGradient.swift
3 | // Randient
4 | //
5 | // Created by Merrick Sapsford on 01/11/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | extension GradientView {
12 |
13 | /// Set a UIGradient.
14 | ///
15 | /// - Parameters:
16 | /// - gradient: Gradient to set.
17 | /// - animated: Whether to animate setting the gradient.
18 | /// - completion: Completion handler of setting gradient.
19 | public func setGradient(_ gradient: UIGradient,
20 | animated: Bool,
21 | completion: (() -> Void)? = nil) {
22 | self.setColors(gradient.data.colors,
23 | animated: animated,
24 | completion: completion)
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Sources/Randient/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | $(MARKETING_VERSION)
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Sources/Randient/Gradient/UIGradientFilter.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIGradientFilter.swift
3 | // Randient
4 | //
5 | // Created by Merrick Sapsford on 16/10/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | /// Filter that can be applied to a `UIGradient`.
12 | public final class UIGradientFilter {
13 |
14 | // MARK: Types
15 |
16 | public typealias Execution = (UIGradient) -> Bool
17 |
18 | // MARK: Properties
19 |
20 | internal let identifier = NSUUID().uuidString
21 | internal let execution: Execution
22 |
23 | // MARK: Init
24 |
25 | internal init(execution: @escaping Execution) {
26 | self.execution = execution
27 | }
28 | }
29 |
30 | extension UIGradientFilter: Equatable {
31 |
32 | public static func == (lhs: UIGradientFilter, rhs: UIGradientFilter) -> Bool {
33 | return lhs.identifier == rhs.identifier
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Sources/Randient/Gradient/UIGradient+Metadata.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIGradient+Metadata.swift
3 | // Randient
4 | //
5 | // Created by Merrick Sapsford on 18/09/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | extension UIGradient {
12 |
13 | /// Gradient Metadata
14 | public struct Metadata {
15 |
16 | /// Whether the gradients color space is primarily 'light' colors.
17 | public let isPredominantlyLight: Bool
18 | }
19 |
20 | /// Metadata about the gradient.
21 | public var metadata: Metadata {
22 | return Metadata(isPredominantlyLight: self.isLight)
23 | }
24 | }
25 |
26 | private extension UIGradient {
27 |
28 | var isLight: Bool {
29 | let lightColors = data.colors.filter({ $0.isLight })
30 | let darkColors = data.colors.filter({ !lightColors.contains($0) })
31 | return lightColors.count > darkColors.count
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/fastlane/Fastfile:
--------------------------------------------------------------------------------
1 |
2 | fastlane_version "2.105.2"
3 |
4 | default_platform :ios
5 |
6 | platform :ios do
7 |
8 | desc "Run unit tests and check library"
9 | lane :test do
10 | scan(workspace: "Randient.xcworkspace", scheme: "Randient", clean: true)
11 | pod_lib_lint
12 | end
13 |
14 | desc "Publish a new version to CocoaPods and GitHub"
15 | lane :publish do
16 | test
17 |
18 | podspec = "Randient.podspec"
19 | version = version_get_podspec(path: podspec)
20 |
21 | # Push new Github release
22 | github_release = set_github_release(
23 | repository_name: "uias/Randient",
24 | api_token: ENV["GITHUB_TOKEN"],
25 | name: version,
26 | tag_name: version,
27 | description: "#{version} release.",
28 | commitish: "master"
29 | )
30 |
31 | # Push spec
32 | pod_push(allow_warnings: true, verbose: true)
33 |
34 | slack(
35 | message: "Pageboy v#{version} released!"
36 | )
37 | end
38 | end
--------------------------------------------------------------------------------
/Dangerfile:
--------------------------------------------------------------------------------
1 |
2 | has_source_changes = !git.modified_files.grep(/Sources.*\.swift/).empty? || !git.added_files.grep(/Sources.*\.swift/).empty?
3 | has_tests_changes = !git.modified_files.grep(/Sources\/RandientTests.*\.swift/).empty? || !git.added_files.grep(/Sources\/RandientTests.*\.swift/).empty?
4 |
5 | # Make it more obvious that a PR is a work in progress and shouldn't be merged yet
6 | warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]"
7 |
8 | # Warn when there is a big PR
9 | warn("This PR might be a little too big, consider breaking it up.") if git.lines_of_code > 500
10 |
11 | # Require PR description
12 | warn "Please provide a summary in the PR description, it makes it easier to understand!" if github.pr_body.length < 5
13 |
14 | # Check for source changes and prompt for test updates if non added.
15 | if (has_source_changes && ! has_tests_changes)
16 | warn("Looks like you changed some source files, should there have been some tests added?")
17 | end
18 |
19 | swiftlint.lint_files
--------------------------------------------------------------------------------
/Scripts/parse.rb:
--------------------------------------------------------------------------------
1 | # @example
2 | # curl https://raw.githubusercontent.com/Ghosh/uiGradients/master/gradients.json | ruby parse.rb
3 |
4 | require 'json'
5 | require 'erb'
6 | require 'fileutils'
7 | require 'active_support/core_ext/string/inflections'
8 |
9 | def parse(body)
10 | @colors = JSON.parse(body).map do |color|
11 | {
12 | "name" => color["name"],
13 | "camelized_name" => color["name"].gsub(/(\W|\d)/, "").split(" ").join("").camelize(:lower), # dirty
14 | "colors" => color["colors"],
15 | }
16 | end
17 | end
18 |
19 | def render_swift
20 | ERB.new(File.read(File.dirname(__FILE__) + "/UIGradient.swift.erb"), nil, '-').result()
21 | end
22 |
23 | def write
24 | gendir = File.dirname(__FILE__) + '/gen'
25 | FileUtils.mkdir_p gendir
26 | File.open(gendir + "/UIGradient.swift", "w") do |f|
27 | f.write render_swift
28 | end
29 | end
30 |
31 | json_string = ARGF.read
32 | puts("Parsing Gradient JSON")
33 | parse(json_string)
34 | puts("Rendering Swift file")
35 | write()
--------------------------------------------------------------------------------
/Randient.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 |
3 | s.name = "Randient"
4 |
5 | s.ios.deployment_target = '9.0'
6 | if s.respond_to? 'swift_versions'
7 | s.swift_versions = ['4.0', '4.1', '4.2', '5.0']
8 | else
9 | s.swift_version = '4.0'
10 | end
11 |
12 | s.requires_arc = true
13 |
14 | s.version = "1.3.1"
15 | s.summary = "Radient, random gradient views."
16 | s.description = <<-DESC
17 | Randomizable, animated gradients generated from uigradients.com.
18 | DESC
19 |
20 | s.homepage = "https://github.com/uias/Randient"
21 | s.license = "MIT"
22 | s.author = { "UI At Six" => "uias@sapsford.tech" }
23 | s.social_media_url = "http://twitter.com/MerrickSapsford"
24 |
25 | s.source = { :git => "https://github.com/uias/Randient.git", :tag => s.version.to_s }
26 | s.source_files = "Sources/Randient/**/*.{h,m,swift}", "Sources/gen/*.{swift}"
27 |
28 | s.prepare_command = './Scripts/update.sh ./Sources'
29 |
30 | end
31 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Merrick Sapsford
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Example/Example/Themeable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Themeable.swift
3 | // Example
4 | //
5 | // Created by Merrick Sapsford on 18/09/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | enum Theme {
12 | case light
13 | case dark
14 | }
15 |
16 | protocol Themeable {
17 |
18 | func applyTheme(_ theme: Theme)
19 | }
20 |
21 | extension Themeable where Self: UIViewController {
22 |
23 | func applyTheme(_ theme: Theme) {
24 | applyTheme(theme, to: self.view, animated: true)
25 | }
26 |
27 | func applyTheme(_ theme: Theme, animated: Bool) {
28 | applyTheme(theme, to: self.view, animated: animated)
29 | }
30 |
31 | private func applyTheme(_ theme: Theme, to view: UIView, animated: Bool) {
32 | for subview in view.subviews {
33 | applyTheme(theme, to: subview, animated: animated)
34 | }
35 |
36 | if let themeableView = view as? Themeable {
37 | if animated {
38 | UIView.transition(with: view, duration: 1.0, options: .transitionCrossDissolve, animations: {
39 | themeableView.applyTheme(theme)
40 | }, completion: nil)
41 | } else {
42 | themeableView.applyTheme(theme)
43 | }
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Example/Example/ActionButton.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ActionButton.swift
3 | // Example
4 | //
5 | // Created by Merrick Sapsford on 09/09/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ActionButton: UIButton {
12 |
13 | // MARK: Defaults
14 |
15 | private struct Defaults {
16 | static let backgroundColor = UIColor.white.withAlphaComponent(0.4)
17 | static let highlightedBackgroundColor = UIColor.white.withAlphaComponent(0.7)
18 | }
19 |
20 | override var isHighlighted: Bool {
21 | didSet {
22 | // UIView.animate(withDuration: 0.2) {
23 | // self.backgroundColor = self.isHighlighted ? Defaults.highlightedBackgroundColor : Defaults.backgroundColor
24 | // }
25 | }
26 | }
27 |
28 | required init?(coder aDecoder: NSCoder) {
29 | super.init(coder: aDecoder)
30 |
31 | layer.cornerRadius = 16.0
32 | backgroundColor = Defaults.backgroundColor
33 | }
34 | }
35 |
36 | extension ActionButton: Themeable {
37 |
38 | func applyTheme(_ theme: Theme) {
39 |
40 | switch theme {
41 | case .light:
42 | backgroundColor = UIColor.white.withAlphaComponent(0.4)
43 | setTitleColor(.black, for: .normal)
44 | case .dark:
45 | backgroundColor = UIColor.black.withAlphaComponent(0.4)
46 | setTitleColor(.white, for: .normal)
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 | All notable changes to this project will be documented in this file.
3 | Randient adheres to [Semantic Versioning](http://semver.org/).
4 |
5 | - `1.3.x` Releases - [1.3.0](#130) | [1.3.1](#131)
6 | - `1.2.x` Releases - [1.2.0](#120)
7 | - `1.1.x` Releases - [1.1.0](#110)
8 | - `1.0.x` Releases - [1.0.0](#100)
9 |
10 | ---
11 | ## [1.3.1](https://github.com/uias/Randient/releases/tag/1.3.1)
12 | Released on 2020-01-04.
13 |
14 | #### Updated
15 | - Randient now supports building with the new Xcode build system.
16 |
17 | #### Fixed
18 | - Issue where gradient colors would fail to parse on older iOS versions.
19 |
20 | ## [1.3.0](https://github.com/uias/Randient/releases/tag/1.3.0)
21 | Released on 2019-04-07.
22 |
23 | #### Added
24 | - Swift 5 support.
25 | - Xcode 10.2 support
26 | - Improved Swift 4.0 support.
27 |
28 | ---
29 | ## [1.2.0](https://github.com/uias/Randient/releases/tag/1.2.0)
30 | Released on 2018-11-01.
31 |
32 | #### Added
33 | - `setGradient()` conveience function to `GradientView`.
34 | - by [msaps](https://github.com/msaps).
35 |
36 | ---
37 | ## [1.1.0](https://github.com/uias/Randient/releases/tag/1.1.0)
38 | Released on 2018-10-16.
39 |
40 | #### Added
41 | - [#1](https://github.com/uias/Randient/pull/1) Ability to filter gradients for random selection.
42 | - by [msaps](https://github.com/msaps).
43 |
44 | ---
45 | ## [1.0.0](https://github.com/uias/Randient/releases/tag/1.0.0)
46 | Released on 2018-10-05.
47 |
48 | **Randient** initial release - Radient, random gradients in Swift.
49 |
--------------------------------------------------------------------------------
/Sources/Randient/Extensions/UIColor+Interpolation.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIColor+Interpolation.swift
3 | // Randient
4 | //
5 | // Created by Merrick Sapsford on 18/09/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | internal extension UIColor {
12 |
13 | func interpolate(between other: UIColor, percent: CGFloat) -> UIColor? {
14 | return UIColor.interpolate(between: self, and: other, percent: percent)
15 | }
16 |
17 | static func interpolate(between color: UIColor,
18 | and other: UIColor,
19 | percent: CGFloat) -> UIColor? {
20 | var redA: CGFloat = 0.0
21 | var greenA: CGFloat = 0.0
22 | var blueA: CGFloat = 0.0
23 | var alphaA: CGFloat = 0.0
24 | guard color.getRed(&redA, green: &greenA, blue: &blueA, alpha: &alphaA) else {
25 | return nil
26 | }
27 |
28 | var redB: CGFloat = 0.0
29 | var greenB: CGFloat = 0.0
30 | var blueB: CGFloat = 0.0
31 | var alphaB: CGFloat = 0.0
32 | guard other.getRed(&redB, green: &greenB, blue: &blueB, alpha: &alphaB) else {
33 | return nil
34 | }
35 |
36 | let iRed = CGFloat(redA + percent * (redB - redA))
37 | let iBlue = CGFloat(blueA + percent * (blueB - blueA))
38 | let iGreen = CGFloat(greenA + percent * (greenB - greenA))
39 | let iAlpha = CGFloat(alphaA + percent * (alphaB - alphaA))
40 |
41 | return UIColor(red: iRed, green: iGreen, blue: iBlue, alpha: iAlpha)
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Example/Example/GradientInfoHeaderView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GradientInfoHeaderView.swift
3 | // Example
4 | //
5 | // Created by Merrick Sapsford on 18/09/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @IBDesignable class GradientInfoHeaderView: UIView {
12 |
13 | private let maskLayer = CAShapeLayer()
14 | @IBOutlet private(set) weak var nameLabel: UILabel!
15 |
16 | // MARK: Init
17 |
18 | override init(frame: CGRect) {
19 | super.init(frame: frame)
20 | initialize()
21 | }
22 |
23 | required init?(coder aDecoder: NSCoder) {
24 | super.init(coder: aDecoder)
25 | initialize()
26 | }
27 |
28 | private func initialize() {
29 | layer.mask = maskLayer
30 | }
31 |
32 | // MARK: Lifecycle
33 |
34 | override func layoutSubviews() {
35 | super.layoutSubviews()
36 |
37 | maskLayer.frame = self.bounds
38 | maskLayer.path = UIBezierPath(roundedRect: self.bounds,
39 | byRoundingCorners: [.bottomLeft, .bottomRight],
40 | cornerRadii: CGSize(width: 32, height: 32)).cgPath
41 | }
42 | }
43 |
44 | extension GradientInfoHeaderView: Themeable {
45 |
46 | func applyTheme(_ theme: Theme) {
47 | switch theme {
48 | case .light:
49 | backgroundColor = UIColor.white.withAlphaComponent(0.8)
50 | nameLabel.textColor = .black
51 | case .dark:
52 | backgroundColor = UIColor.black.withAlphaComponent(0.8)
53 | nameLabel.textColor = .white
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Example/Example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Randient
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Scripts/UIGradient.swift.erb:
--------------------------------------------------------------------------------
1 | //
2 | // UIGradient.swift
3 | // Randient
4 | //
5 | // Auto Generated by UI At Six.
6 | // Gradients provided courtesy of uigradients.com.
7 | //
8 |
9 | import UIKit
10 |
11 | extension UIGradient {
12 |
13 | public struct Data {
14 | public let name: String
15 | public let colors: [UIColor]
16 | }
17 | }
18 |
19 | public enum UIGradient: CaseIterable {
20 | <% @colors.each do |color| %>case <%=color["camelized_name"]%>
21 | <% end -%>
22 | }
23 |
24 | extension UIGradient {
25 |
26 | public var data: Data {
27 | switch self {
28 | <% @colors.each do |color| %>case .<%=color["camelized_name"]%>:
29 | return Data(name: "<%=color["name"]%>",
30 | colors: [<% color["colors"].each do |hexString| %>ColorParser.parse("<%=hexString %>"), <% end %>])
31 | <% end %>
32 | }
33 | }
34 | }
35 |
36 | private class ColorParser {
37 |
38 | class func parse(_ hex: String) -> UIColor {
39 | var cString:String = hex.trimmingCharacters(in: .whitespacesAndNewlines).uppercased()
40 |
41 | if (cString.hasPrefix("#")) {
42 | cString.remove(at: cString.startIndex)
43 | }
44 |
45 | if ((cString.count) != 6) {
46 | return UIColor.gray
47 | }
48 |
49 | var rgbValue:UInt64 = 0
50 | Scanner(string: cString).scanHexInt64(&rgbValue)
51 |
52 | return UIColor(
53 | red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
54 | green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
55 | blue: CGFloat(rgbValue & 0x0000FF) / 255.0,
56 | alpha: CGFloat(1.0)
57 | )
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | ## Playgrounds
32 | timeline.xctimeline
33 | playground.xcworkspace
34 |
35 | # Swift Package Manager
36 | #
37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
38 | # Packages/
39 | # Package.pins
40 | # Package.resolved
41 | .build/
42 |
43 | # CocoaPods
44 | #
45 | # We recommend against adding the Pods directory to your .gitignore. However
46 | # you should judge for yourself, the pros and cons are mentioned at:
47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
48 | #
49 | # Pods/
50 |
51 | # Carthage
52 | #
53 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
54 | # Carthage/Checkouts
55 |
56 | Carthage/Build
57 |
58 | # fastlane
59 | #
60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
61 | # screenshots whenever they are needed.
62 | # For more information about the recommended setup visit:
63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
64 |
65 | fastlane/report.xml
66 | fastlane/Preview.html
67 | fastlane/screenshots/**/*.png
68 | fastlane/test_output
69 |
70 | /Sources/gen
71 |
--------------------------------------------------------------------------------
/Sources/Randient/Views/RandientView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RandientView.swift
3 | // Randient
4 | //
5 | // Created by Merrick Sapsford on 09/09/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | /// Gradient View that provides the ability to display random `UIGradient` gradients.
12 | open class RandientView: GradientView {
13 |
14 | // MARK: Properties
15 |
16 | /// The currently visible gradient.
17 | open private(set) var gradient: UIGradient!
18 |
19 | // MARK: Init
20 |
21 | public override init(frame: CGRect) {
22 | super.init(frame: frame)
23 | randomize(animated: false)
24 | }
25 |
26 | public required init?(coder aDecoder: NSCoder) {
27 | super.init(coder: aDecoder)
28 | randomize(animated: false)
29 | }
30 |
31 | // MARK: Randomization
32 |
33 | /// Display a new randomly selected gradient.
34 | ///
35 | /// - Parameters:
36 | /// - animated: Whether to animate the update.
37 | /// - completion: Completion handler.
38 | /// - Returns: The new gradient.
39 | @discardableResult
40 | open func randomize(animated: Bool,
41 | completion: (() -> Void)? = nil) -> UIGradient {
42 | let gradient = Randient.randomize()
43 | update(for: gradient,
44 | animated: animated,
45 | completion: completion)
46 | return gradient
47 | }
48 |
49 | // MARK: Updating
50 |
51 | private func update(for gradient: UIGradient,
52 | animated: Bool,
53 | completion: (() -> Void)?) {
54 | self.gradient = gradient
55 | setGradient(gradient,
56 | animated: animated,
57 | completion: completion)
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Example/Example/GradientViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GradientViewController.swift
3 | // Example
4 | //
5 | // Created by Merrick Sapsford on 09/09/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import Randient
11 |
12 | class GradientViewController: UIViewController, Themeable {
13 |
14 | @IBOutlet private weak var randientView: RandientView!
15 | @IBOutlet private weak var headerView: GradientInfoHeaderView!
16 |
17 | private var currentTheme: Theme?
18 |
19 | override var preferredStatusBarStyle: UIStatusBarStyle {
20 | if currentTheme == .dark {
21 | return .lightContent
22 | }
23 | return .default
24 | }
25 |
26 | // MARK: Lifecycle
27 |
28 | override func viewDidLoad() {
29 | super.viewDidLoad()
30 |
31 | let gradient: UIGradient = randientView.gradient
32 | headerView.nameLabel.text = gradient.data.name
33 | applyTheme(for: gradient, animated: false)
34 | }
35 |
36 | // MARK: Actions
37 |
38 | @IBAction private func randomizeButtonPressed(_ sender: UIButton) {
39 | let gradient = randientView.randomize(animated: true)
40 | headerView.nameLabel.text = gradient.data.name
41 | applyTheme(for: gradient, animated: true)
42 | }
43 | }
44 |
45 | private extension GradientViewController {
46 |
47 | func applyTheme(for gradient: UIGradient, animated: Bool) {
48 | let theme: Theme = gradient.metadata.isPredominantlyLight ? .light : .dark
49 | guard theme != self.currentTheme else {
50 | return
51 | }
52 | self.currentTheme = theme
53 | applyTheme(theme, animated: animated)
54 |
55 | if animated {
56 | UIView.animate(withDuration: 1.0) {
57 | self.setNeedsStatusBarAppearanceUpdate()
58 | }
59 | } else {
60 | setNeedsStatusBarAppearanceUpdate()
61 | }
62 | }
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/Example/Example/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Example
4 | //
5 | // Created by Merrick Sapsford on 09/09/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "60x60",
35 | "idiom" : "iphone",
36 | "filename" : "Icon@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "60x60",
41 | "idiom" : "iphone",
42 | "filename" : "Icon@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "idiom" : "ipad",
47 | "size" : "20x20",
48 | "scale" : "1x"
49 | },
50 | {
51 | "idiom" : "ipad",
52 | "size" : "20x20",
53 | "scale" : "2x"
54 | },
55 | {
56 | "idiom" : "ipad",
57 | "size" : "29x29",
58 | "scale" : "1x"
59 | },
60 | {
61 | "idiom" : "ipad",
62 | "size" : "29x29",
63 | "scale" : "2x"
64 | },
65 | {
66 | "idiom" : "ipad",
67 | "size" : "40x40",
68 | "scale" : "1x"
69 | },
70 | {
71 | "idiom" : "ipad",
72 | "size" : "40x40",
73 | "scale" : "2x"
74 | },
75 | {
76 | "size" : "76x76",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-1.png",
79 | "scale" : "1x"
80 | },
81 | {
82 | "size" : "76x76",
83 | "idiom" : "ipad",
84 | "filename" : "Icon@2x-1.png",
85 | "scale" : "2x"
86 | },
87 | {
88 | "size" : "83.5x83.5",
89 | "idiom" : "ipad",
90 | "filename" : "Icon copy.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "1024x1024",
95 | "idiom" : "ios-marketing",
96 | "filename" : "Icon.png",
97 | "scale" : "1x"
98 | }
99 | ],
100 | "info" : {
101 | "version" : 1,
102 | "author" : "xcode"
103 | }
104 | }
--------------------------------------------------------------------------------
/Sources/Randient/Randient.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Randient.swift
3 | // Randient
4 | //
5 | // Created by Merrick Sapsford on 09/09/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public class Randient {
12 |
13 | // MARK: Properties
14 |
15 | /// Filters that are applied to random selection.
16 | public private(set) static var filters = [UIGradientFilter]()
17 |
18 | /// The last randomized gradient.
19 | private static var lastGradient: UIGradient?
20 |
21 | // MARK: Randomization
22 |
23 | /// Randomly select a new gradient from `UIGradients`.
24 | ///
25 | /// - Returns: Randomly selected gradient.
26 | public class func randomize() -> UIGradient {
27 | let allGradients = UIGradient.allCases
28 | let index = Int.random(in: 0 ..< allGradients.count)
29 |
30 | if let newGradient = verifyGradient(allGradients[index]) {
31 | return newGradient
32 | } else {
33 | return randomize()
34 | }
35 | }
36 | }
37 |
38 | // MARK: - Verification
39 | extension Randient {
40 |
41 | internal class func verifyGradient(_ gradient: UIGradient) -> UIGradient? {
42 | guard let gradient = verifyIsNewGradient(gradient) else {
43 | return nil
44 | }
45 | guard checkGradient(gradient, passes: Randient.filters) else {
46 | return nil
47 | }
48 |
49 | return gradient
50 | }
51 |
52 | /// Verify that the new gradient can be used.
53 | ///
54 | /// Checks that it is not equal to the previously returned gradient.
55 | ///
56 | /// - Parameter gradient: New gradient.
57 | /// - Returns: Gradient if it can be used.
58 | internal class func verifyIsNewGradient(_ gradient: UIGradient) -> UIGradient? {
59 | guard gradient.data.colors != lastGradient?.data.colors else {
60 | return nil
61 | }
62 | guard checkGradient(gradient, passes: Randient.filters) else {
63 | return nil
64 | }
65 |
66 | self.lastGradient = gradient
67 | return gradient
68 | }
69 | }
70 |
71 | // MARK: - Filtering
72 | extension Randient {
73 |
74 | /// Add a new filter that is applied to the randomly selected gradients.
75 | ///
76 | /// - Parameter filters: Execution of the filter.
77 | public class func addFilter(that filters: @escaping UIGradientFilter.Execution) {
78 | Randient.filters.append(UIGradientFilter(execution: filters))
79 | }
80 |
81 | /// Remove a filter from being applied to random selection.
82 | ///
83 | /// - Parameter filter: Filter to remove.
84 | public class func removeFilter(_ filter: UIGradientFilter) {
85 | guard let index = Randient.filters.firstIndex(of: filter) else {
86 | return
87 | }
88 | Randient.filters.remove(at: index)
89 | }
90 |
91 | internal class func checkGradient(_ gradient: UIGradient,
92 | passes filters: [UIGradientFilter]) -> Bool {
93 | for filter in filters {
94 | if filter.execution(gradient) == false {
95 | return false
96 | }
97 | }
98 | return true
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/Sources/Randient.xcodeproj/xcshareddata/xcschemes/Randient.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
42 |
48 |
49 |
50 |
51 |
52 |
62 |
63 |
69 |
70 |
71 |
72 |
78 |
79 |
85 |
86 |
87 |
88 |
90 |
91 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | ## ⭐️ Features
29 |
30 | - [x] Beautiful, automatically generated gradients from [uiGradients](https://uigradients.com) in Swift.
31 | - [x] Smoothly animating, randomizable gradient views.
32 | - [x] Life is like a box of chocolates.
33 |
34 | ## 📋 Requirements
35 |
36 | iOS 9 & Swift 4 / 5.
37 |
38 | ## 📲 Installation
39 |
40 | ### CocoaPods
41 |
42 | To install Randient using CocoaPods, add this line to your `Podfile`:
43 |
44 | ```ruby
45 | pod 'Randient'
46 | ```
47 |
48 | ### Carthage
49 |
50 | To install Randient using Carthage, add this line to your `Cartfile`:
51 |
52 | ```ruby
53 | github "Randient"
54 | ```
55 |
56 | ## 🚀 Usage
57 |
58 | ### Gradient Roulette
59 | `RandientView` is a simple view that will display a randomly selected gradient from the [uiGradients](https://uigradients.com) catalog.
60 |
61 | ```swift
62 | let randientView = RandientView()
63 | randientView.frame = CGRect(x: 0, y: 0, width: 100, height: 100)
64 | view.addSubview(randientView)
65 | ```
66 |
67 | Updating to a new gradient is as simple as...
68 |
69 | ```swift
70 | randientView.randomize(animated: true)
71 | ```
72 |
73 | ### Those wonderful gradients
74 |
75 | An enum of all the gradients from [uiGradients](https://uigradients.com) is generated every time that Randient is built.
76 |
77 | These are available as an enum via `UIGradient`.
78 |
79 | ```swift
80 | let gradient = UIGradient.royalBlue
81 | let colors = gradient.data.colors
82 | ```
83 |
84 | If you're feeling lucky, a randomized `UIGradient` can also be retrieved.
85 |
86 | ```swift
87 | let randomGradient = Randient.randomize()
88 | ```
89 |
90 | #### The raw stuff
91 |
92 | Each `UIGradient` has associated `Data` which can be accessed via `.data`.
93 |
94 | ```swift
95 | struct Data {
96 | public let name: String
97 | public let colors: [UIColor]
98 | }
99 | ```
100 |
101 | `Metadata` is also available, accessible via `.metadata`.
102 |
103 | ```swift
104 | struct Metadata {
105 | public let isPredominantlyLight: Bool
106 | }
107 | ```
108 |
109 | ### Gradient View
110 |
111 | `RandientView` inherits from `GradientView`, which under the hood uses simply uses a `CAGradientLayer` for rendering gradients.
112 |
113 | `GradientView` provides the following:
114 | - `.colors: [UIColor]?` - Colors of the gradient.
115 | - `.locations: [Double]?` - Locations of each gradient stop.
116 | - `.startPoint: CGPoint` - Start point of the gradient (Defaults to `0.5, 0.0`).
117 | - `.endPoint: CGPoint` - End point of the gradient (Defaults to `0.5, 1.0`).
118 |
119 | ## 👨🏻💻 About
120 | - Created by [Merrick Sapsford](https://github.com/msaps) ([@MerrickSapsford](https://twitter.com/MerrickSapsford))
121 | - Heavily inspired by [UIColor-uiGradientsAdditions](https://github.com/kaiinui/UIColor-uiGradientsAdditions) by [kaiinui](https://github.com/kaiinui).
122 |
123 | ## ❤️ Contributing
124 | Bug reports and pull requests are welcome on GitHub at [https://github.com/uias/Randient](https://github.com/uias/Randient).
125 |
126 | ## 👮🏻♂️ License
127 | The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
128 |
--------------------------------------------------------------------------------
/Sources/Randient/Views/GradientView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GradientView.swift
3 | // Randient
4 | //
5 | // Created by Merrick Sapsford on 09/09/2018.
6 | // Copyright © 2018 UI At Six. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | /// View which displays a gradient layer in its bounds.
12 | open class GradientView: UIView {
13 |
14 | // MARK: Properties
15 |
16 | private var gradientLayer: CAGradientLayer? {
17 | if let gradientLayer = self.layer as? CAGradientLayer {
18 | return gradientLayer
19 | }
20 | return nil
21 | }
22 |
23 | /// The colors that are currently active in the gradient. Animatable.
24 | open private(set) var colors: [UIColor]? = nil {
25 | didSet {
26 | var colorRefs = [CGColor]()
27 | for color in colors ?? [] {
28 | colorRefs.append(color.cgColor)
29 | }
30 | gradientLayer?.colors = colorRefs
31 | }
32 | }
33 |
34 | /// Locations of each gradient stop. Animatable.
35 | open var locations: [Double]? = nil {
36 | didSet {
37 | var locationNumbers = [NSNumber]()
38 | for location in locations ?? [] {
39 | locationNumbers.append(NSNumber(value: location))
40 | }
41 | gradientLayer?.locations = locationNumbers
42 | }
43 | }
44 |
45 | /// The start point of the gradient in the layers coordinate space. Animiatable.
46 | open var startPoint: CGPoint = CGPoint(x: 0.5, y: 0.0) {
47 | didSet {
48 | gradientLayer?.startPoint = startPoint
49 | }
50 | }
51 | /// The end point of the gradient in the layers coordinate space. Animiatable.
52 | open var endPoint: CGPoint = CGPoint(x: 0.5, y: 1.0) {
53 | didSet {
54 | gradientLayer?.endPoint = endPoint
55 | }
56 | }
57 |
58 | open override class var layerClass: AnyClass {
59 | return CAGradientLayer.self
60 | }
61 |
62 | // MARK: Init
63 |
64 | public override init(frame: CGRect) {
65 | super.init(frame: frame)
66 | initialize()
67 | }
68 |
69 | public required init?(coder aDecoder: NSCoder) {
70 | super.init(coder: aDecoder)
71 | initialize()
72 | }
73 |
74 | private func initialize() {
75 | self.colors = [UIColor.white, UIColor.black]
76 | gradientLayer?.startPoint = self.startPoint
77 | gradientLayer?.endPoint = self.endPoint
78 | }
79 |
80 | // MARK: Customization
81 |
82 | /// Update the colors of the gradient.
83 | ///
84 | /// - Parameters:
85 | /// - colors: New colors.
86 | /// - animated: Whether to animate the update.
87 | /// - duration: Duration of the animation.
88 | /// - completion: Completion handler.
89 | internal func setColors(_ colors: [UIColor],
90 | animated: Bool,
91 | duration: TimeInterval = 1.0,
92 | completion: (() -> Void)?) {
93 |
94 | // Equalize colors
95 | self.colors = equalize(colors: self.colors, with: colors)
96 | let fromColors = gradientLayer?.colors
97 | self.colors = equalize(colors: colors, with: self.colors)
98 |
99 | if animated {
100 |
101 | CATransaction.begin()
102 |
103 | let animation = CABasicAnimation(keyPath: "colors")
104 | animation.fromValue = fromColors
105 | animation.toValue = gradientLayer?.colors
106 | animation.duration = duration
107 | animation.isRemovedOnCompletion = true
108 | #if swift(>=4.2)
109 | animation.fillMode = .forwards
110 | animation.timingFunction = CAMediaTimingFunction(name: .linear)
111 | #else
112 | animation.fillMode = kCAFillModeForwards
113 | animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
114 | #endif
115 |
116 | CATransaction.setCompletionBlock {
117 | completion?()
118 | }
119 |
120 | gradientLayer?.add(animation, forKey: "colors")
121 | CATransaction.commit()
122 | } else {
123 | completion?()
124 | }
125 | }
126 | }
127 |
128 | private extension GradientView {
129 |
130 | /// Ensures an array of colors is equalized with another array.
131 | ///
132 | /// Uses color interpolation to insert any missing values.
133 | ///
134 | /// - Parameters:
135 | /// - colors: Colors to equalize.
136 | /// - others: Colors to compare against.
137 | /// - Returns: Equalized colors.
138 | func equalize(colors: [UIColor]?, with others: [UIColor]?) -> [UIColor]? {
139 | guard let colors = colors, let others = others,
140 | let first = colors.first, let last = colors.last else {
141 | return nil
142 | }
143 | let delta = others.count - colors.count
144 | guard delta > 0 else {
145 | return colors
146 | }
147 |
148 | let interpolationPoint = 1.0 / CGFloat(delta + 1)
149 | var newColors = [first]
150 | for point in 1 ... delta {
151 | let percent = CGFloat(point) * interpolationPoint
152 | if let color = first.interpolate(between: last, percent: percent) {
153 | newColors.append(color)
154 | }
155 | }
156 | newColors.append(last)
157 |
158 | return newColors
159 | }
160 | }
161 |
--------------------------------------------------------------------------------
/Example/Example/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
30 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | CFPropertyList (3.0.2)
5 | activesupport (4.2.11.1)
6 | i18n (~> 0.7)
7 | minitest (~> 5.1)
8 | thread_safe (~> 0.3, >= 0.3.4)
9 | tzinfo (~> 1.1)
10 | addressable (2.7.0)
11 | public_suffix (>= 2.0.2, < 5.0)
12 | algoliasearch (1.27.1)
13 | httpclient (~> 2.8, >= 2.8.3)
14 | json (>= 1.5.1)
15 | atomos (0.1.3)
16 | babosa (1.0.3)
17 | claide (1.0.3)
18 | claide-plugins (0.9.2)
19 | cork
20 | nap
21 | open4 (~> 1.3)
22 | cocoapods (1.8.4)
23 | activesupport (>= 4.0.2, < 5)
24 | claide (>= 1.0.2, < 2.0)
25 | cocoapods-core (= 1.8.4)
26 | cocoapods-deintegrate (>= 1.0.3, < 2.0)
27 | cocoapods-downloader (>= 1.2.2, < 2.0)
28 | cocoapods-plugins (>= 1.0.0, < 2.0)
29 | cocoapods-search (>= 1.0.0, < 2.0)
30 | cocoapods-stats (>= 1.0.0, < 2.0)
31 | cocoapods-trunk (>= 1.4.0, < 2.0)
32 | cocoapods-try (>= 1.1.0, < 2.0)
33 | colored2 (~> 3.1)
34 | escape (~> 0.0.4)
35 | fourflusher (>= 2.3.0, < 3.0)
36 | gh_inspector (~> 1.0)
37 | molinillo (~> 0.6.6)
38 | nap (~> 1.0)
39 | ruby-macho (~> 1.4)
40 | xcodeproj (>= 1.11.1, < 2.0)
41 | cocoapods-core (1.8.4)
42 | activesupport (>= 4.0.2, < 6)
43 | algoliasearch (~> 1.0)
44 | concurrent-ruby (~> 1.1)
45 | fuzzy_match (~> 2.0.4)
46 | nap (~> 1.0)
47 | cocoapods-deintegrate (1.0.4)
48 | cocoapods-downloader (1.3.0)
49 | cocoapods-plugins (1.0.0)
50 | nap
51 | cocoapods-search (1.0.0)
52 | cocoapods-stats (1.1.0)
53 | cocoapods-trunk (1.4.1)
54 | nap (>= 0.8, < 2.0)
55 | netrc (~> 0.11)
56 | cocoapods-try (1.1.0)
57 | colored (1.2)
58 | colored2 (3.1.2)
59 | commander-fastlane (4.4.6)
60 | highline (~> 1.7.2)
61 | concurrent-ruby (1.1.5)
62 | cork (0.3.0)
63 | colored2 (~> 3.1)
64 | danger (6.1.0)
65 | claide (~> 1.0)
66 | claide-plugins (>= 0.9.2)
67 | colored2 (~> 3.1)
68 | cork (~> 0.1)
69 | faraday (~> 0.9)
70 | faraday-http-cache (~> 2.0)
71 | git (~> 1.5)
72 | kramdown (~> 2.0)
73 | kramdown-parser-gfm (~> 1.0)
74 | no_proxy_fix
75 | octokit (~> 4.7)
76 | terminal-table (~> 1)
77 | danger-swiftlint (0.23.0)
78 | danger
79 | rake (> 10)
80 | thor (~> 0.19)
81 | declarative (0.0.10)
82 | declarative-option (0.1.0)
83 | digest-crc (0.4.1)
84 | domain_name (0.5.20190701)
85 | unf (>= 0.0.5, < 1.0.0)
86 | dotenv (2.7.5)
87 | emoji_regex (1.0.1)
88 | escape (0.0.4)
89 | excon (0.71.1)
90 | faraday (0.17.3)
91 | multipart-post (>= 1.2, < 3)
92 | faraday-cookie_jar (0.0.6)
93 | faraday (>= 0.7.4)
94 | http-cookie (~> 1.0.0)
95 | faraday-http-cache (2.0.0)
96 | faraday (~> 0.8)
97 | faraday_middleware (0.13.1)
98 | faraday (>= 0.7.4, < 1.0)
99 | fastimage (2.1.7)
100 | fastlane (2.139.0)
101 | CFPropertyList (>= 2.3, < 4.0.0)
102 | addressable (>= 2.3, < 3.0.0)
103 | babosa (>= 1.0.2, < 2.0.0)
104 | bundler (>= 1.12.0, < 3.0.0)
105 | colored
106 | commander-fastlane (>= 4.4.6, < 5.0.0)
107 | dotenv (>= 2.1.1, < 3.0.0)
108 | emoji_regex (>= 0.1, < 2.0)
109 | excon (>= 0.71.0, < 1.0.0)
110 | faraday (~> 0.17)
111 | faraday-cookie_jar (~> 0.0.6)
112 | faraday_middleware (~> 0.13.1)
113 | fastimage (>= 2.1.0, < 3.0.0)
114 | gh_inspector (>= 1.1.2, < 2.0.0)
115 | google-api-client (>= 0.29.2, < 0.37.0)
116 | google-cloud-storage (>= 1.15.0, < 2.0.0)
117 | highline (>= 1.7.2, < 2.0.0)
118 | json (< 3.0.0)
119 | jwt (~> 2.1.0)
120 | mini_magick (>= 4.9.4, < 5.0.0)
121 | multi_xml (~> 0.5)
122 | multipart-post (~> 2.0.0)
123 | plist (>= 3.1.0, < 4.0.0)
124 | public_suffix (~> 2.0.0)
125 | rubyzip (>= 1.3.0, < 2.0.0)
126 | security (= 0.1.3)
127 | simctl (~> 1.6.3)
128 | slack-notifier (>= 2.0.0, < 3.0.0)
129 | terminal-notifier (>= 2.0.0, < 3.0.0)
130 | terminal-table (>= 1.4.5, < 2.0.0)
131 | tty-screen (>= 0.6.3, < 1.0.0)
132 | tty-spinner (>= 0.8.0, < 1.0.0)
133 | word_wrap (~> 1.0.0)
134 | xcodeproj (>= 1.13.0, < 2.0.0)
135 | xcpretty (~> 0.3.0)
136 | xcpretty-travis-formatter (>= 0.0.3)
137 | fileutils (1.4.1)
138 | fourflusher (2.3.1)
139 | fuzzy_match (2.0.4)
140 | gh_inspector (1.1.3)
141 | git (1.5.0)
142 | google-api-client (0.36.3)
143 | addressable (~> 2.5, >= 2.5.1)
144 | googleauth (~> 0.9)
145 | httpclient (>= 2.8.1, < 3.0)
146 | mini_mime (~> 1.0)
147 | representable (~> 3.0)
148 | retriable (>= 2.0, < 4.0)
149 | signet (~> 0.12)
150 | google-cloud-core (1.4.1)
151 | google-cloud-env (~> 1.0)
152 | google-cloud-env (1.3.0)
153 | faraday (~> 0.11)
154 | google-cloud-storage (1.25.0)
155 | addressable (~> 2.5)
156 | digest-crc (~> 0.4)
157 | google-api-client (~> 0.33)
158 | google-cloud-core (~> 1.2)
159 | googleauth (~> 0.9)
160 | mini_mime (~> 1.0)
161 | googleauth (0.10.0)
162 | faraday (~> 0.12)
163 | jwt (>= 1.4, < 3.0)
164 | memoist (~> 0.16)
165 | multi_json (~> 1.11)
166 | os (>= 0.9, < 2.0)
167 | signet (~> 0.12)
168 | highline (1.7.10)
169 | http-cookie (1.0.3)
170 | domain_name (~> 0.5)
171 | httpclient (2.8.3)
172 | i18n (0.9.5)
173 | concurrent-ruby (~> 1.0)
174 | json (2.3.0)
175 | jwt (2.1.0)
176 | kramdown (2.1.0)
177 | kramdown-parser-gfm (1.1.0)
178 | kramdown (~> 2.0)
179 | memoist (0.16.2)
180 | mini_magick (4.9.5)
181 | mini_mime (1.0.2)
182 | minitest (5.13.0)
183 | molinillo (0.6.6)
184 | multi_json (1.14.1)
185 | multi_xml (0.6.0)
186 | multipart-post (2.0.0)
187 | nanaimo (0.2.6)
188 | nap (1.1.0)
189 | naturally (2.2.0)
190 | netrc (0.11.0)
191 | no_proxy_fix (0.1.2)
192 | octokit (4.15.0)
193 | faraday (>= 0.9)
194 | sawyer (~> 0.8.0, >= 0.5.3)
195 | open4 (1.3.4)
196 | os (1.0.1)
197 | plist (3.5.0)
198 | public_suffix (2.0.5)
199 | rake (13.0.1)
200 | representable (3.0.4)
201 | declarative (< 0.1.0)
202 | declarative-option (< 0.2.0)
203 | uber (< 0.2.0)
204 | retriable (3.1.2)
205 | rouge (2.0.7)
206 | ruby-macho (1.4.0)
207 | rubyzip (1.3.0)
208 | sawyer (0.8.2)
209 | addressable (>= 2.3.5)
210 | faraday (> 0.8, < 2.0)
211 | security (0.1.3)
212 | signet (0.12.0)
213 | addressable (~> 2.3)
214 | faraday (~> 0.9)
215 | jwt (>= 1.5, < 3.0)
216 | multi_json (~> 1.10)
217 | simctl (1.6.7)
218 | CFPropertyList
219 | naturally
220 | slack-notifier (2.3.2)
221 | terminal-notifier (2.0.0)
222 | terminal-table (1.8.0)
223 | unicode-display_width (~> 1.1, >= 1.1.1)
224 | thor (0.20.3)
225 | thread_safe (0.3.6)
226 | tty-cursor (0.7.0)
227 | tty-screen (0.7.0)
228 | tty-spinner (0.9.2)
229 | tty-cursor (~> 0.7)
230 | tzinfo (1.2.6)
231 | thread_safe (~> 0.1)
232 | uber (0.1.0)
233 | unf (0.1.4)
234 | unf_ext
235 | unf_ext (0.0.7.6)
236 | unicode-display_width (1.6.0)
237 | word_wrap (1.0.0)
238 | xcodeproj (1.14.0)
239 | CFPropertyList (>= 2.3.3, < 4.0)
240 | atomos (~> 0.1.3)
241 | claide (>= 1.0.2, < 2.0)
242 | colored2 (~> 3.1)
243 | nanaimo (~> 0.2.6)
244 | xcpretty (0.3.0)
245 | rouge (~> 2.0.7)
246 | xcpretty-travis-formatter (1.0.0)
247 | xcpretty (~> 0.2, >= 0.0.7)
248 |
249 | PLATFORMS
250 | ruby
251 |
252 | DEPENDENCIES
253 | activesupport
254 | cocoapods (~> 1.8)
255 | danger
256 | danger-swiftlint
257 | fastlane
258 | fileutils
259 | json
260 |
261 | BUNDLED WITH
262 | 1.17.3
263 |
--------------------------------------------------------------------------------
/Example/Example/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
36 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/Example/Example.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 4639DD6421451D180038E5A6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4639DD6321451D180038E5A6 /* AppDelegate.swift */; };
11 | 4639DD6621451D180038E5A6 /* GradientViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4639DD6521451D180038E5A6 /* GradientViewController.swift */; };
12 | 4639DD6921451D180038E5A6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4639DD6721451D180038E5A6 /* Main.storyboard */; };
13 | 4639DD6B21451D180038E5A6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4639DD6A21451D180038E5A6 /* Assets.xcassets */; };
14 | 4639DD6E21451D180038E5A6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4639DD6C21451D180038E5A6 /* LaunchScreen.storyboard */; };
15 | 4639DD7621451D490038E5A6 /* Randient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4639DD7521451D490038E5A6 /* Randient.framework */; };
16 | 4639DD7721451D490038E5A6 /* Randient.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4639DD7521451D490038E5A6 /* Randient.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 464BE4DF21454D65009B2A0D /* ActionButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 464BE4DE21454D65009B2A0D /* ActionButton.swift */; };
18 | 46DBB9D221516E640094B965 /* GradientInfoHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46DBB9D121516E640094B965 /* GradientInfoHeaderView.swift */; };
19 | 46DBB9E02151907A0094B965 /* Themeable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46DBB9DF2151907A0094B965 /* Themeable.swift */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXCopyFilesBuildPhase section */
23 | 4639DD7821451D490038E5A6 /* Embed Frameworks */ = {
24 | isa = PBXCopyFilesBuildPhase;
25 | buildActionMask = 2147483647;
26 | dstPath = "";
27 | dstSubfolderSpec = 10;
28 | files = (
29 | 4639DD7721451D490038E5A6 /* Randient.framework in Embed Frameworks */,
30 | );
31 | name = "Embed Frameworks";
32 | runOnlyForDeploymentPostprocessing = 0;
33 | };
34 | /* End PBXCopyFilesBuildPhase section */
35 |
36 | /* Begin PBXFileReference section */
37 | 4639DD6021451D180038E5A6 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
38 | 4639DD6321451D180038E5A6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
39 | 4639DD6521451D180038E5A6 /* GradientViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientViewController.swift; sourceTree = ""; };
40 | 4639DD6821451D180038E5A6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
41 | 4639DD6A21451D180038E5A6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
42 | 4639DD6D21451D180038E5A6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
43 | 4639DD6F21451D180038E5A6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
44 | 4639DD7521451D490038E5A6 /* Randient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Randient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
45 | 464BE4DE21454D65009B2A0D /* ActionButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionButton.swift; sourceTree = ""; };
46 | 46DBB9D121516E640094B965 /* GradientInfoHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientInfoHeaderView.swift; sourceTree = ""; };
47 | 46DBB9DF2151907A0094B965 /* Themeable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Themeable.swift; sourceTree = ""; };
48 | /* End PBXFileReference section */
49 |
50 | /* Begin PBXFrameworksBuildPhase section */
51 | 4639DD5D21451D180038E5A6 /* Frameworks */ = {
52 | isa = PBXFrameworksBuildPhase;
53 | buildActionMask = 2147483647;
54 | files = (
55 | 4639DD7621451D490038E5A6 /* Randient.framework in Frameworks */,
56 | );
57 | runOnlyForDeploymentPostprocessing = 0;
58 | };
59 | /* End PBXFrameworksBuildPhase section */
60 |
61 | /* Begin PBXGroup section */
62 | 4639DD5721451D180038E5A6 = {
63 | isa = PBXGroup;
64 | children = (
65 | 4639DD6221451D180038E5A6 /* Example */,
66 | 4639DD6121451D180038E5A6 /* Products */,
67 | 4639DD7521451D490038E5A6 /* Randient.framework */,
68 | );
69 | sourceTree = "";
70 | };
71 | 4639DD6121451D180038E5A6 /* Products */ = {
72 | isa = PBXGroup;
73 | children = (
74 | 4639DD6021451D180038E5A6 /* Example.app */,
75 | );
76 | name = Products;
77 | sourceTree = "";
78 | };
79 | 4639DD6221451D180038E5A6 /* Example */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 4639DD6321451D180038E5A6 /* AppDelegate.swift */,
83 | 4639DD6521451D180038E5A6 /* GradientViewController.swift */,
84 | 4639DD6721451D180038E5A6 /* Main.storyboard */,
85 | 464BE4DC21454D47009B2A0D /* Example Extras */,
86 | 464BE4DB21454D24009B2A0D /* Resources */,
87 | );
88 | path = Example;
89 | sourceTree = "";
90 | };
91 | 464BE4DB21454D24009B2A0D /* Resources */ = {
92 | isa = PBXGroup;
93 | children = (
94 | 4639DD6A21451D180038E5A6 /* Assets.xcassets */,
95 | 4639DD6C21451D180038E5A6 /* LaunchScreen.storyboard */,
96 | 4639DD6F21451D180038E5A6 /* Info.plist */,
97 | );
98 | name = Resources;
99 | sourceTree = "";
100 | };
101 | 464BE4DC21454D47009B2A0D /* Example Extras */ = {
102 | isa = PBXGroup;
103 | children = (
104 | 464BE4DD21454D52009B2A0D /* Components */,
105 | );
106 | name = "Example Extras";
107 | sourceTree = "";
108 | };
109 | 464BE4DD21454D52009B2A0D /* Components */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 464BE4DE21454D65009B2A0D /* ActionButton.swift */,
113 | 46DBB9D121516E640094B965 /* GradientInfoHeaderView.swift */,
114 | 46DBB9DF2151907A0094B965 /* Themeable.swift */,
115 | );
116 | name = Components;
117 | sourceTree = "";
118 | };
119 | /* End PBXGroup section */
120 |
121 | /* Begin PBXNativeTarget section */
122 | 4639DD5F21451D180038E5A6 /* Example */ = {
123 | isa = PBXNativeTarget;
124 | buildConfigurationList = 4639DD7221451D180038E5A6 /* Build configuration list for PBXNativeTarget "Example" */;
125 | buildPhases = (
126 | 4639DD5C21451D180038E5A6 /* Sources */,
127 | 4639DD5D21451D180038E5A6 /* Frameworks */,
128 | 4639DD5E21451D180038E5A6 /* Resources */,
129 | 4639DD7821451D490038E5A6 /* Embed Frameworks */,
130 | );
131 | buildRules = (
132 | );
133 | dependencies = (
134 | );
135 | name = Example;
136 | productName = Example;
137 | productReference = 4639DD6021451D180038E5A6 /* Example.app */;
138 | productType = "com.apple.product-type.application";
139 | };
140 | /* End PBXNativeTarget section */
141 |
142 | /* Begin PBXProject section */
143 | 4639DD5821451D180038E5A6 /* Project object */ = {
144 | isa = PBXProject;
145 | attributes = {
146 | LastSwiftUpdateCheck = 0940;
147 | LastUpgradeCheck = 1130;
148 | ORGANIZATIONNAME = "UI At Six";
149 | TargetAttributes = {
150 | 4639DD5F21451D180038E5A6 = {
151 | CreatedOnToolsVersion = 9.4;
152 | };
153 | };
154 | };
155 | buildConfigurationList = 4639DD5B21451D180038E5A6 /* Build configuration list for PBXProject "Example" */;
156 | compatibilityVersion = "Xcode 9.3";
157 | developmentRegion = en;
158 | hasScannedForEncodings = 0;
159 | knownRegions = (
160 | en,
161 | Base,
162 | );
163 | mainGroup = 4639DD5721451D180038E5A6;
164 | productRefGroup = 4639DD6121451D180038E5A6 /* Products */;
165 | projectDirPath = "";
166 | projectRoot = "";
167 | targets = (
168 | 4639DD5F21451D180038E5A6 /* Example */,
169 | );
170 | };
171 | /* End PBXProject section */
172 |
173 | /* Begin PBXResourcesBuildPhase section */
174 | 4639DD5E21451D180038E5A6 /* Resources */ = {
175 | isa = PBXResourcesBuildPhase;
176 | buildActionMask = 2147483647;
177 | files = (
178 | 4639DD6E21451D180038E5A6 /* LaunchScreen.storyboard in Resources */,
179 | 4639DD6B21451D180038E5A6 /* Assets.xcassets in Resources */,
180 | 4639DD6921451D180038E5A6 /* Main.storyboard in Resources */,
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | };
184 | /* End PBXResourcesBuildPhase section */
185 |
186 | /* Begin PBXSourcesBuildPhase section */
187 | 4639DD5C21451D180038E5A6 /* Sources */ = {
188 | isa = PBXSourcesBuildPhase;
189 | buildActionMask = 2147483647;
190 | files = (
191 | 4639DD6621451D180038E5A6 /* GradientViewController.swift in Sources */,
192 | 464BE4DF21454D65009B2A0D /* ActionButton.swift in Sources */,
193 | 46DBB9E02151907A0094B965 /* Themeable.swift in Sources */,
194 | 4639DD6421451D180038E5A6 /* AppDelegate.swift in Sources */,
195 | 46DBB9D221516E640094B965 /* GradientInfoHeaderView.swift in Sources */,
196 | );
197 | runOnlyForDeploymentPostprocessing = 0;
198 | };
199 | /* End PBXSourcesBuildPhase section */
200 |
201 | /* Begin PBXVariantGroup section */
202 | 4639DD6721451D180038E5A6 /* Main.storyboard */ = {
203 | isa = PBXVariantGroup;
204 | children = (
205 | 4639DD6821451D180038E5A6 /* Base */,
206 | );
207 | name = Main.storyboard;
208 | sourceTree = "";
209 | };
210 | 4639DD6C21451D180038E5A6 /* LaunchScreen.storyboard */ = {
211 | isa = PBXVariantGroup;
212 | children = (
213 | 4639DD6D21451D180038E5A6 /* Base */,
214 | );
215 | name = LaunchScreen.storyboard;
216 | sourceTree = "";
217 | };
218 | /* End PBXVariantGroup section */
219 |
220 | /* Begin XCBuildConfiguration section */
221 | 4639DD7021451D180038E5A6 /* Debug */ = {
222 | isa = XCBuildConfiguration;
223 | buildSettings = {
224 | ALWAYS_SEARCH_USER_PATHS = NO;
225 | CLANG_ANALYZER_NONNULL = YES;
226 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
227 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
228 | CLANG_CXX_LIBRARY = "libc++";
229 | CLANG_ENABLE_MODULES = YES;
230 | CLANG_ENABLE_OBJC_ARC = YES;
231 | CLANG_ENABLE_OBJC_WEAK = YES;
232 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
233 | CLANG_WARN_BOOL_CONVERSION = YES;
234 | CLANG_WARN_COMMA = YES;
235 | CLANG_WARN_CONSTANT_CONVERSION = YES;
236 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
237 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
238 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
239 | CLANG_WARN_EMPTY_BODY = YES;
240 | CLANG_WARN_ENUM_CONVERSION = YES;
241 | CLANG_WARN_INFINITE_RECURSION = YES;
242 | CLANG_WARN_INT_CONVERSION = YES;
243 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
244 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
245 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
246 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
247 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
248 | CLANG_WARN_STRICT_PROTOTYPES = YES;
249 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
250 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
251 | CLANG_WARN_UNREACHABLE_CODE = YES;
252 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
253 | CODE_SIGN_IDENTITY = "iPhone Developer";
254 | COPY_PHASE_STRIP = NO;
255 | DEBUG_INFORMATION_FORMAT = dwarf;
256 | ENABLE_STRICT_OBJC_MSGSEND = YES;
257 | ENABLE_TESTABILITY = YES;
258 | GCC_C_LANGUAGE_STANDARD = gnu11;
259 | GCC_DYNAMIC_NO_PIC = NO;
260 | GCC_NO_COMMON_BLOCKS = YES;
261 | GCC_OPTIMIZATION_LEVEL = 0;
262 | GCC_PREPROCESSOR_DEFINITIONS = (
263 | "DEBUG=1",
264 | "$(inherited)",
265 | );
266 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
267 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
268 | GCC_WARN_UNDECLARED_SELECTOR = YES;
269 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
270 | GCC_WARN_UNUSED_FUNCTION = YES;
271 | GCC_WARN_UNUSED_VARIABLE = YES;
272 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
273 | MTL_ENABLE_DEBUG_INFO = YES;
274 | ONLY_ACTIVE_ARCH = YES;
275 | SDKROOT = iphoneos;
276 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
277 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
278 | };
279 | name = Debug;
280 | };
281 | 4639DD7121451D180038E5A6 /* Release */ = {
282 | isa = XCBuildConfiguration;
283 | buildSettings = {
284 | ALWAYS_SEARCH_USER_PATHS = NO;
285 | CLANG_ANALYZER_NONNULL = YES;
286 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
287 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
288 | CLANG_CXX_LIBRARY = "libc++";
289 | CLANG_ENABLE_MODULES = YES;
290 | CLANG_ENABLE_OBJC_ARC = YES;
291 | CLANG_ENABLE_OBJC_WEAK = YES;
292 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
293 | CLANG_WARN_BOOL_CONVERSION = YES;
294 | CLANG_WARN_COMMA = YES;
295 | CLANG_WARN_CONSTANT_CONVERSION = YES;
296 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
297 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
298 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
299 | CLANG_WARN_EMPTY_BODY = YES;
300 | CLANG_WARN_ENUM_CONVERSION = YES;
301 | CLANG_WARN_INFINITE_RECURSION = YES;
302 | CLANG_WARN_INT_CONVERSION = YES;
303 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
304 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
305 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
306 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
307 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
308 | CLANG_WARN_STRICT_PROTOTYPES = YES;
309 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
310 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
311 | CLANG_WARN_UNREACHABLE_CODE = YES;
312 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
313 | CODE_SIGN_IDENTITY = "iPhone Developer";
314 | COPY_PHASE_STRIP = NO;
315 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
316 | ENABLE_NS_ASSERTIONS = NO;
317 | ENABLE_STRICT_OBJC_MSGSEND = YES;
318 | GCC_C_LANGUAGE_STANDARD = gnu11;
319 | GCC_NO_COMMON_BLOCKS = YES;
320 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
321 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
322 | GCC_WARN_UNDECLARED_SELECTOR = YES;
323 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
324 | GCC_WARN_UNUSED_FUNCTION = YES;
325 | GCC_WARN_UNUSED_VARIABLE = YES;
326 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
327 | MTL_ENABLE_DEBUG_INFO = NO;
328 | SDKROOT = iphoneos;
329 | SWIFT_COMPILATION_MODE = wholemodule;
330 | SWIFT_OPTIMIZATION_LEVEL = "-O";
331 | VALIDATE_PRODUCT = YES;
332 | };
333 | name = Release;
334 | };
335 | 4639DD7321451D180038E5A6 /* Debug */ = {
336 | isa = XCBuildConfiguration;
337 | buildSettings = {
338 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
339 | CODE_SIGN_STYLE = Automatic;
340 | INFOPLIST_FILE = Example/Info.plist;
341 | LD_RUNPATH_SEARCH_PATHS = (
342 | "$(inherited)",
343 | "@executable_path/Frameworks",
344 | );
345 | PRODUCT_BUNDLE_IDENTIFIER = "com.uias.Randient-Example";
346 | PRODUCT_NAME = "$(TARGET_NAME)";
347 | SWIFT_VERSION = 4.2;
348 | TARGETED_DEVICE_FAMILY = "1,2";
349 | };
350 | name = Debug;
351 | };
352 | 4639DD7421451D180038E5A6 /* Release */ = {
353 | isa = XCBuildConfiguration;
354 | buildSettings = {
355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
356 | CODE_SIGN_STYLE = Automatic;
357 | INFOPLIST_FILE = Example/Info.plist;
358 | LD_RUNPATH_SEARCH_PATHS = (
359 | "$(inherited)",
360 | "@executable_path/Frameworks",
361 | );
362 | PRODUCT_BUNDLE_IDENTIFIER = "com.uias.Randient-Example";
363 | PRODUCT_NAME = "$(TARGET_NAME)";
364 | SWIFT_VERSION = 4.2;
365 | TARGETED_DEVICE_FAMILY = "1,2";
366 | };
367 | name = Release;
368 | };
369 | /* End XCBuildConfiguration section */
370 |
371 | /* Begin XCConfigurationList section */
372 | 4639DD5B21451D180038E5A6 /* Build configuration list for PBXProject "Example" */ = {
373 | isa = XCConfigurationList;
374 | buildConfigurations = (
375 | 4639DD7021451D180038E5A6 /* Debug */,
376 | 4639DD7121451D180038E5A6 /* Release */,
377 | );
378 | defaultConfigurationIsVisible = 0;
379 | defaultConfigurationName = Release;
380 | };
381 | 4639DD7221451D180038E5A6 /* Build configuration list for PBXNativeTarget "Example" */ = {
382 | isa = XCConfigurationList;
383 | buildConfigurations = (
384 | 4639DD7321451D180038E5A6 /* Debug */,
385 | 4639DD7421451D180038E5A6 /* Release */,
386 | );
387 | defaultConfigurationIsVisible = 0;
388 | defaultConfigurationName = Release;
389 | };
390 | /* End XCConfigurationList section */
391 | };
392 | rootObject = 4639DD5821451D180038E5A6 /* Project object */;
393 | }
394 |
--------------------------------------------------------------------------------
/Sources/Randient.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 4622FF9D216755D400214563 /* UIGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4622FF9C216755D400214563 /* UIGradient.swift */; };
11 | 4622FFA02167AA3B00214563 /* UIGradientMetadataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4622FF9F2167AA3B00214563 /* UIGradientMetadataTests.swift */; };
12 | 4639DD5121451CFA0038E5A6 /* Randient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4639DD4F21451CFA0038E5A6 /* Randient.h */; settings = {ATTRIBUTES = (Public, ); }; };
13 | 464BE4E321455020009B2A0D /* Randient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 464BE4E221455020009B2A0D /* Randient.swift */; };
14 | 468EE01C2166A5A400C27982 /* RandientTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 468EE01B2166A5A400C27982 /* RandientTests.swift */; };
15 | 468EE01E2166A5A400C27982 /* Randient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4639DD4C21451CFA0038E5A6 /* Randient.framework */; };
16 | 46D87759218B51F800C83076 /* GradientView+UIGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46D87758218B51F800C83076 /* GradientView+UIGradient.swift */; };
17 | 46DBB9D8215173D40094B965 /* UIColor+Analysis.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46DBB9D4215173D40094B965 /* UIColor+Analysis.swift */; };
18 | 46DBB9D9215173D40094B965 /* RandientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46DBB9D6215173D40094B965 /* RandientView.swift */; };
19 | 46DBB9DA215173D40094B965 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46DBB9D7215173D40094B965 /* GradientView.swift */; };
20 | 46DBB9DC215173E40094B965 /* UIColor+Interpolation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46DBB9DB215173E40094B965 /* UIColor+Interpolation.swift */; };
21 | 46E057A42175F2F1003FB809 /* UIGradientFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46E057A22175F2F1003FB809 /* UIGradientFilter.swift */; };
22 | 46E057A52175F2F1003FB809 /* UIGradient+Metadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46E057A32175F2F1003FB809 /* UIGradient+Metadata.swift */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXContainerItemProxy section */
26 | 468EE01F2166A5A400C27982 /* PBXContainerItemProxy */ = {
27 | isa = PBXContainerItemProxy;
28 | containerPortal = 4639DD4321451CFA0038E5A6 /* Project object */;
29 | proxyType = 1;
30 | remoteGlobalIDString = 4639DD4B21451CFA0038E5A6;
31 | remoteInfo = Randient;
32 | };
33 | /* End PBXContainerItemProxy section */
34 |
35 | /* Begin PBXFileReference section */
36 | 4622FF9C216755D400214563 /* UIGradient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIGradient.swift; sourceTree = ""; };
37 | 4622FF9F2167AA3B00214563 /* UIGradientMetadataTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIGradientMetadataTests.swift; sourceTree = ""; };
38 | 4639DD4C21451CFA0038E5A6 /* Randient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Randient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
39 | 4639DD4F21451CFA0038E5A6 /* Randient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Randient.h; sourceTree = ""; };
40 | 4639DD5021451CFA0038E5A6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
41 | 464BE4E221455020009B2A0D /* Randient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Randient.swift; sourceTree = ""; };
42 | 468EE0192166A5A400C27982 /* RandientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RandientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
43 | 468EE01B2166A5A400C27982 /* RandientTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandientTests.swift; sourceTree = ""; };
44 | 468EE01D2166A5A400C27982 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | 46D87758218B51F800C83076 /* GradientView+UIGradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "GradientView+UIGradient.swift"; sourceTree = ""; };
46 | 46DBB9D4215173D40094B965 /* UIColor+Analysis.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Analysis.swift"; sourceTree = ""; };
47 | 46DBB9D6215173D40094B965 /* RandientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RandientView.swift; sourceTree = ""; };
48 | 46DBB9D7215173D40094B965 /* GradientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = ""; };
49 | 46DBB9DB215173E40094B965 /* UIColor+Interpolation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Interpolation.swift"; sourceTree = ""; };
50 | 46E057A22175F2F1003FB809 /* UIGradientFilter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIGradientFilter.swift; sourceTree = ""; };
51 | 46E057A32175F2F1003FB809 /* UIGradient+Metadata.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIGradient+Metadata.swift"; sourceTree = ""; };
52 | /* End PBXFileReference section */
53 |
54 | /* Begin PBXFrameworksBuildPhase section */
55 | 4639DD4821451CFA0038E5A6 /* Frameworks */ = {
56 | isa = PBXFrameworksBuildPhase;
57 | buildActionMask = 2147483647;
58 | files = (
59 | );
60 | runOnlyForDeploymentPostprocessing = 0;
61 | };
62 | 468EE0162166A5A400C27982 /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | 468EE01E2166A5A400C27982 /* Randient.framework in Frameworks */,
67 | );
68 | runOnlyForDeploymentPostprocessing = 0;
69 | };
70 | /* End PBXFrameworksBuildPhase section */
71 |
72 | /* Begin PBXGroup section */
73 | 4622FF9B216755D400214563 /* gen */ = {
74 | isa = PBXGroup;
75 | children = (
76 | 4622FF9C216755D400214563 /* UIGradient.swift */,
77 | );
78 | path = gen;
79 | sourceTree = "";
80 | };
81 | 4639DD4221451CFA0038E5A6 = {
82 | isa = PBXGroup;
83 | children = (
84 | 4639DD4E21451CFA0038E5A6 /* Randient */,
85 | 4622FF9B216755D400214563 /* gen */,
86 | 468EE01A2166A5A400C27982 /* RandientTests */,
87 | 4639DD4D21451CFA0038E5A6 /* Products */,
88 | );
89 | sourceTree = "";
90 | };
91 | 4639DD4D21451CFA0038E5A6 /* Products */ = {
92 | isa = PBXGroup;
93 | children = (
94 | 4639DD4C21451CFA0038E5A6 /* Randient.framework */,
95 | 468EE0192166A5A400C27982 /* RandientTests.xctest */,
96 | );
97 | name = Products;
98 | sourceTree = "";
99 | };
100 | 4639DD4E21451CFA0038E5A6 /* Randient */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 4639DD4F21451CFA0038E5A6 /* Randient.h */,
104 | 464BE4E221455020009B2A0D /* Randient.swift */,
105 | 46E057A12175F2F1003FB809 /* Gradient */,
106 | 46DBB9D5215173D40094B965 /* Views */,
107 | 46DBB9D3215173D40094B965 /* Extensions */,
108 | 4639DD5021451CFA0038E5A6 /* Info.plist */,
109 | );
110 | path = Randient;
111 | sourceTree = "";
112 | };
113 | 468EE01A2166A5A400C27982 /* RandientTests */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 468EE01B2166A5A400C27982 /* RandientTests.swift */,
117 | 4622FF9F2167AA3B00214563 /* UIGradientMetadataTests.swift */,
118 | 468EE01D2166A5A400C27982 /* Info.plist */,
119 | );
120 | path = RandientTests;
121 | sourceTree = "";
122 | };
123 | 46DBB9D3215173D40094B965 /* Extensions */ = {
124 | isa = PBXGroup;
125 | children = (
126 | 46DBB9D4215173D40094B965 /* UIColor+Analysis.swift */,
127 | 46DBB9DB215173E40094B965 /* UIColor+Interpolation.swift */,
128 | );
129 | path = Extensions;
130 | sourceTree = "";
131 | };
132 | 46DBB9D5215173D40094B965 /* Views */ = {
133 | isa = PBXGroup;
134 | children = (
135 | 46DBB9D6215173D40094B965 /* RandientView.swift */,
136 | 46DBB9D7215173D40094B965 /* GradientView.swift */,
137 | 46D87758218B51F800C83076 /* GradientView+UIGradient.swift */,
138 | );
139 | path = Views;
140 | sourceTree = "";
141 | };
142 | 46E057A12175F2F1003FB809 /* Gradient */ = {
143 | isa = PBXGroup;
144 | children = (
145 | 46E057A22175F2F1003FB809 /* UIGradientFilter.swift */,
146 | 46E057A32175F2F1003FB809 /* UIGradient+Metadata.swift */,
147 | );
148 | path = Gradient;
149 | sourceTree = "";
150 | };
151 | /* End PBXGroup section */
152 |
153 | /* Begin PBXHeadersBuildPhase section */
154 | 4639DD4921451CFA0038E5A6 /* Headers */ = {
155 | isa = PBXHeadersBuildPhase;
156 | buildActionMask = 2147483647;
157 | files = (
158 | 4639DD5121451CFA0038E5A6 /* Randient.h in Headers */,
159 | );
160 | runOnlyForDeploymentPostprocessing = 0;
161 | };
162 | /* End PBXHeadersBuildPhase section */
163 |
164 | /* Begin PBXNativeTarget section */
165 | 4639DD4B21451CFA0038E5A6 /* Randient */ = {
166 | isa = PBXNativeTarget;
167 | buildConfigurationList = 4639DD5421451CFA0038E5A6 /* Build configuration list for PBXNativeTarget "Randient" */;
168 | buildPhases = (
169 | 46E057A62175F5E3003FB809 /* SwiftLint */,
170 | 46FB496A21453142005363F7 /* Generate Gradients */,
171 | 4639DD4721451CFA0038E5A6 /* Sources */,
172 | 4639DD4821451CFA0038E5A6 /* Frameworks */,
173 | 4639DD4921451CFA0038E5A6 /* Headers */,
174 | 4639DD4A21451CFA0038E5A6 /* Resources */,
175 | );
176 | buildRules = (
177 | );
178 | dependencies = (
179 | );
180 | name = Randient;
181 | productName = Randient;
182 | productReference = 4639DD4C21451CFA0038E5A6 /* Randient.framework */;
183 | productType = "com.apple.product-type.framework";
184 | };
185 | 468EE0182166A5A400C27982 /* RandientTests */ = {
186 | isa = PBXNativeTarget;
187 | buildConfigurationList = 468EE0232166A5A400C27982 /* Build configuration list for PBXNativeTarget "RandientTests" */;
188 | buildPhases = (
189 | 468EE0152166A5A400C27982 /* Sources */,
190 | 468EE0162166A5A400C27982 /* Frameworks */,
191 | 468EE0172166A5A400C27982 /* Resources */,
192 | );
193 | buildRules = (
194 | );
195 | dependencies = (
196 | 468EE0202166A5A400C27982 /* PBXTargetDependency */,
197 | );
198 | name = RandientTests;
199 | productName = RandientTests;
200 | productReference = 468EE0192166A5A400C27982 /* RandientTests.xctest */;
201 | productType = "com.apple.product-type.bundle.unit-test";
202 | };
203 | /* End PBXNativeTarget section */
204 |
205 | /* Begin PBXProject section */
206 | 4639DD4321451CFA0038E5A6 /* Project object */ = {
207 | isa = PBXProject;
208 | attributes = {
209 | LastSwiftUpdateCheck = 1000;
210 | LastUpgradeCheck = 1130;
211 | ORGANIZATIONNAME = "UI At Six";
212 | TargetAttributes = {
213 | 4639DD4B21451CFA0038E5A6 = {
214 | CreatedOnToolsVersion = 9.4;
215 | LastSwiftMigration = 1020;
216 | };
217 | 468EE0182166A5A400C27982 = {
218 | CreatedOnToolsVersion = 10.0;
219 | LastSwiftMigration = 1020;
220 | };
221 | };
222 | };
223 | buildConfigurationList = 4639DD4621451CFA0038E5A6 /* Build configuration list for PBXProject "Randient" */;
224 | compatibilityVersion = "Xcode 9.3";
225 | developmentRegion = en;
226 | hasScannedForEncodings = 0;
227 | knownRegions = (
228 | en,
229 | Base,
230 | );
231 | mainGroup = 4639DD4221451CFA0038E5A6;
232 | productRefGroup = 4639DD4D21451CFA0038E5A6 /* Products */;
233 | projectDirPath = "";
234 | projectRoot = "";
235 | targets = (
236 | 4639DD4B21451CFA0038E5A6 /* Randient */,
237 | 468EE0182166A5A400C27982 /* RandientTests */,
238 | );
239 | };
240 | /* End PBXProject section */
241 |
242 | /* Begin PBXResourcesBuildPhase section */
243 | 4639DD4A21451CFA0038E5A6 /* Resources */ = {
244 | isa = PBXResourcesBuildPhase;
245 | buildActionMask = 2147483647;
246 | files = (
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | };
250 | 468EE0172166A5A400C27982 /* Resources */ = {
251 | isa = PBXResourcesBuildPhase;
252 | buildActionMask = 2147483647;
253 | files = (
254 | );
255 | runOnlyForDeploymentPostprocessing = 0;
256 | };
257 | /* End PBXResourcesBuildPhase section */
258 |
259 | /* Begin PBXShellScriptBuildPhase section */
260 | 46E057A62175F5E3003FB809 /* SwiftLint */ = {
261 | isa = PBXShellScriptBuildPhase;
262 | buildActionMask = 2147483647;
263 | files = (
264 | );
265 | inputFileListPaths = (
266 | );
267 | inputPaths = (
268 | );
269 | name = SwiftLint;
270 | outputFileListPaths = (
271 | );
272 | outputPaths = (
273 | );
274 | runOnlyForDeploymentPostprocessing = 0;
275 | shellPath = /bin/sh;
276 | shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nfi\n";
277 | };
278 | 46FB496A21453142005363F7 /* Generate Gradients */ = {
279 | isa = PBXShellScriptBuildPhase;
280 | buildActionMask = 2147483647;
281 | files = (
282 | );
283 | inputPaths = (
284 | );
285 | name = "Generate Gradients";
286 | outputPaths = (
287 | "$(PROJECT_DIR)/gen/UIGradient.swift",
288 | );
289 | runOnlyForDeploymentPostprocessing = 0;
290 | shellPath = /bin/sh;
291 | shellScript = "SCRIPTS_DIR=\"$PROJECT_DIR/../Scripts\"\n\n$SCRIPTS_DIR/update.sh $SRCROOT\n";
292 | };
293 | /* End PBXShellScriptBuildPhase section */
294 |
295 | /* Begin PBXSourcesBuildPhase section */
296 | 4639DD4721451CFA0038E5A6 /* Sources */ = {
297 | isa = PBXSourcesBuildPhase;
298 | buildActionMask = 2147483647;
299 | files = (
300 | 4622FF9D216755D400214563 /* UIGradient.swift in Sources */,
301 | 46DBB9DC215173E40094B965 /* UIColor+Interpolation.swift in Sources */,
302 | 46DBB9D8215173D40094B965 /* UIColor+Analysis.swift in Sources */,
303 | 46DBB9DA215173D40094B965 /* GradientView.swift in Sources */,
304 | 46E057A52175F2F1003FB809 /* UIGradient+Metadata.swift in Sources */,
305 | 46D87759218B51F800C83076 /* GradientView+UIGradient.swift in Sources */,
306 | 464BE4E321455020009B2A0D /* Randient.swift in Sources */,
307 | 46E057A42175F2F1003FB809 /* UIGradientFilter.swift in Sources */,
308 | 46DBB9D9215173D40094B965 /* RandientView.swift in Sources */,
309 | );
310 | runOnlyForDeploymentPostprocessing = 0;
311 | };
312 | 468EE0152166A5A400C27982 /* Sources */ = {
313 | isa = PBXSourcesBuildPhase;
314 | buildActionMask = 2147483647;
315 | files = (
316 | 4622FFA02167AA3B00214563 /* UIGradientMetadataTests.swift in Sources */,
317 | 468EE01C2166A5A400C27982 /* RandientTests.swift in Sources */,
318 | );
319 | runOnlyForDeploymentPostprocessing = 0;
320 | };
321 | /* End PBXSourcesBuildPhase section */
322 |
323 | /* Begin PBXTargetDependency section */
324 | 468EE0202166A5A400C27982 /* PBXTargetDependency */ = {
325 | isa = PBXTargetDependency;
326 | target = 4639DD4B21451CFA0038E5A6 /* Randient */;
327 | targetProxy = 468EE01F2166A5A400C27982 /* PBXContainerItemProxy */;
328 | };
329 | /* End PBXTargetDependency section */
330 |
331 | /* Begin XCBuildConfiguration section */
332 | 4639DD5221451CFA0038E5A6 /* Debug */ = {
333 | isa = XCBuildConfiguration;
334 | buildSettings = {
335 | ALWAYS_SEARCH_USER_PATHS = NO;
336 | CLANG_ANALYZER_NONNULL = YES;
337 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
339 | CLANG_CXX_LIBRARY = "libc++";
340 | CLANG_ENABLE_MODULES = YES;
341 | CLANG_ENABLE_OBJC_ARC = YES;
342 | CLANG_ENABLE_OBJC_WEAK = YES;
343 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
344 | CLANG_WARN_BOOL_CONVERSION = YES;
345 | CLANG_WARN_COMMA = YES;
346 | CLANG_WARN_CONSTANT_CONVERSION = YES;
347 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
348 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
349 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
350 | CLANG_WARN_EMPTY_BODY = YES;
351 | CLANG_WARN_ENUM_CONVERSION = YES;
352 | CLANG_WARN_INFINITE_RECURSION = YES;
353 | CLANG_WARN_INT_CONVERSION = YES;
354 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
355 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
356 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
357 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
358 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
359 | CLANG_WARN_STRICT_PROTOTYPES = YES;
360 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
361 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
362 | CLANG_WARN_UNREACHABLE_CODE = YES;
363 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
364 | CODE_SIGN_IDENTITY = "iPhone Developer";
365 | COPY_PHASE_STRIP = NO;
366 | CURRENT_PROJECT_VERSION = 1;
367 | DEBUG_INFORMATION_FORMAT = dwarf;
368 | ENABLE_STRICT_OBJC_MSGSEND = YES;
369 | ENABLE_TESTABILITY = YES;
370 | GCC_C_LANGUAGE_STANDARD = gnu11;
371 | GCC_DYNAMIC_NO_PIC = NO;
372 | GCC_NO_COMMON_BLOCKS = YES;
373 | GCC_OPTIMIZATION_LEVEL = 0;
374 | GCC_PREPROCESSOR_DEFINITIONS = (
375 | "DEBUG=1",
376 | "$(inherited)",
377 | );
378 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
379 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
380 | GCC_WARN_UNDECLARED_SELECTOR = YES;
381 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
382 | GCC_WARN_UNUSED_FUNCTION = YES;
383 | GCC_WARN_UNUSED_VARIABLE = YES;
384 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
385 | MTL_ENABLE_DEBUG_INFO = YES;
386 | ONLY_ACTIVE_ARCH = YES;
387 | SDKROOT = iphoneos;
388 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
389 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
390 | SWIFT_VERSION = 4.0;
391 | VERSIONING_SYSTEM = "apple-generic";
392 | VERSION_INFO_PREFIX = "";
393 | };
394 | name = Debug;
395 | };
396 | 4639DD5321451CFA0038E5A6 /* Release */ = {
397 | isa = XCBuildConfiguration;
398 | buildSettings = {
399 | ALWAYS_SEARCH_USER_PATHS = NO;
400 | CLANG_ANALYZER_NONNULL = YES;
401 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
402 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
403 | CLANG_CXX_LIBRARY = "libc++";
404 | CLANG_ENABLE_MODULES = YES;
405 | CLANG_ENABLE_OBJC_ARC = YES;
406 | CLANG_ENABLE_OBJC_WEAK = YES;
407 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
408 | CLANG_WARN_BOOL_CONVERSION = YES;
409 | CLANG_WARN_COMMA = YES;
410 | CLANG_WARN_CONSTANT_CONVERSION = YES;
411 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
412 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
413 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
414 | CLANG_WARN_EMPTY_BODY = YES;
415 | CLANG_WARN_ENUM_CONVERSION = YES;
416 | CLANG_WARN_INFINITE_RECURSION = YES;
417 | CLANG_WARN_INT_CONVERSION = YES;
418 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
419 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
420 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
421 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
422 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
423 | CLANG_WARN_STRICT_PROTOTYPES = YES;
424 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
425 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
426 | CLANG_WARN_UNREACHABLE_CODE = YES;
427 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
428 | CODE_SIGN_IDENTITY = "iPhone Developer";
429 | COPY_PHASE_STRIP = NO;
430 | CURRENT_PROJECT_VERSION = 1;
431 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
432 | ENABLE_NS_ASSERTIONS = NO;
433 | ENABLE_STRICT_OBJC_MSGSEND = YES;
434 | GCC_C_LANGUAGE_STANDARD = gnu11;
435 | GCC_NO_COMMON_BLOCKS = YES;
436 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
437 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
438 | GCC_WARN_UNDECLARED_SELECTOR = YES;
439 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
440 | GCC_WARN_UNUSED_FUNCTION = YES;
441 | GCC_WARN_UNUSED_VARIABLE = YES;
442 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
443 | MTL_ENABLE_DEBUG_INFO = NO;
444 | SDKROOT = iphoneos;
445 | SWIFT_COMPILATION_MODE = wholemodule;
446 | SWIFT_OPTIMIZATION_LEVEL = "-O";
447 | SWIFT_VERSION = 4.0;
448 | VALIDATE_PRODUCT = YES;
449 | VERSIONING_SYSTEM = "apple-generic";
450 | VERSION_INFO_PREFIX = "";
451 | };
452 | name = Release;
453 | };
454 | 4639DD5521451CFA0038E5A6 /* Debug */ = {
455 | isa = XCBuildConfiguration;
456 | buildSettings = {
457 | CLANG_ENABLE_MODULES = YES;
458 | CODE_SIGN_IDENTITY = "";
459 | CODE_SIGN_STYLE = Automatic;
460 | DEFINES_MODULE = YES;
461 | DYLIB_COMPATIBILITY_VERSION = 1;
462 | DYLIB_CURRENT_VERSION = 1;
463 | DYLIB_INSTALL_NAME_BASE = "@rpath";
464 | INFOPLIST_FILE = Randient/Info.plist;
465 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
466 | LD_RUNPATH_SEARCH_PATHS = (
467 | "$(inherited)",
468 | "@executable_path/Frameworks",
469 | "@loader_path/Frameworks",
470 | );
471 | MARKETING_VERSION = 1.3.1;
472 | PRODUCT_BUNDLE_IDENTIFIER = com.uias.Randient;
473 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
474 | SKIP_INSTALL = YES;
475 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
476 | TARGETED_DEVICE_FAMILY = "1,2";
477 | };
478 | name = Debug;
479 | };
480 | 4639DD5621451CFA0038E5A6 /* Release */ = {
481 | isa = XCBuildConfiguration;
482 | buildSettings = {
483 | CLANG_ENABLE_MODULES = YES;
484 | CODE_SIGN_IDENTITY = "";
485 | CODE_SIGN_STYLE = Automatic;
486 | DEFINES_MODULE = YES;
487 | DYLIB_COMPATIBILITY_VERSION = 1;
488 | DYLIB_CURRENT_VERSION = 1;
489 | DYLIB_INSTALL_NAME_BASE = "@rpath";
490 | INFOPLIST_FILE = Randient/Info.plist;
491 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
492 | LD_RUNPATH_SEARCH_PATHS = (
493 | "$(inherited)",
494 | "@executable_path/Frameworks",
495 | "@loader_path/Frameworks",
496 | );
497 | MARKETING_VERSION = 1.3.1;
498 | PRODUCT_BUNDLE_IDENTIFIER = com.uias.Randient;
499 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
500 | SKIP_INSTALL = YES;
501 | TARGETED_DEVICE_FAMILY = "1,2";
502 | };
503 | name = Release;
504 | };
505 | 468EE0212166A5A400C27982 /* Debug */ = {
506 | isa = XCBuildConfiguration;
507 | buildSettings = {
508 | CODE_SIGN_STYLE = Automatic;
509 | INFOPLIST_FILE = RandientTests/Info.plist;
510 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
511 | LD_RUNPATH_SEARCH_PATHS = (
512 | "$(inherited)",
513 | "@executable_path/Frameworks",
514 | "@loader_path/Frameworks",
515 | );
516 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
517 | MTL_FAST_MATH = YES;
518 | PRODUCT_BUNDLE_IDENTIFIER = com.uias.RandientTests;
519 | PRODUCT_NAME = "$(TARGET_NAME)";
520 | TARGETED_DEVICE_FAMILY = "1,2";
521 | };
522 | name = Debug;
523 | };
524 | 468EE0222166A5A400C27982 /* Release */ = {
525 | isa = XCBuildConfiguration;
526 | buildSettings = {
527 | CODE_SIGN_STYLE = Automatic;
528 | INFOPLIST_FILE = RandientTests/Info.plist;
529 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
530 | LD_RUNPATH_SEARCH_PATHS = (
531 | "$(inherited)",
532 | "@executable_path/Frameworks",
533 | "@loader_path/Frameworks",
534 | );
535 | MTL_FAST_MATH = YES;
536 | PRODUCT_BUNDLE_IDENTIFIER = com.uias.RandientTests;
537 | PRODUCT_NAME = "$(TARGET_NAME)";
538 | TARGETED_DEVICE_FAMILY = "1,2";
539 | };
540 | name = Release;
541 | };
542 | /* End XCBuildConfiguration section */
543 |
544 | /* Begin XCConfigurationList section */
545 | 4639DD4621451CFA0038E5A6 /* Build configuration list for PBXProject "Randient" */ = {
546 | isa = XCConfigurationList;
547 | buildConfigurations = (
548 | 4639DD5221451CFA0038E5A6 /* Debug */,
549 | 4639DD5321451CFA0038E5A6 /* Release */,
550 | );
551 | defaultConfigurationIsVisible = 0;
552 | defaultConfigurationName = Release;
553 | };
554 | 4639DD5421451CFA0038E5A6 /* Build configuration list for PBXNativeTarget "Randient" */ = {
555 | isa = XCConfigurationList;
556 | buildConfigurations = (
557 | 4639DD5521451CFA0038E5A6 /* Debug */,
558 | 4639DD5621451CFA0038E5A6 /* Release */,
559 | );
560 | defaultConfigurationIsVisible = 0;
561 | defaultConfigurationName = Release;
562 | };
563 | 468EE0232166A5A400C27982 /* Build configuration list for PBXNativeTarget "RandientTests" */ = {
564 | isa = XCConfigurationList;
565 | buildConfigurations = (
566 | 468EE0212166A5A400C27982 /* Debug */,
567 | 468EE0222166A5A400C27982 /* Release */,
568 | );
569 | defaultConfigurationIsVisible = 0;
570 | defaultConfigurationName = Release;
571 | };
572 | /* End XCConfigurationList section */
573 | };
574 | rootObject = 4639DD4321451CFA0038E5A6 /* Project object */;
575 | }
576 |
--------------------------------------------------------------------------------