├── .gitignore
├── .swift-version
├── .travis.yml
├── LICENSE
├── Package.swift
├── README.md
├── Screenshot
├── elliptical_shadow.png
├── inner_shadow.png
└── outer_shadow.png
├── Sources
├── SwiftyInnerShadowLayer.swift
├── SwiftyInnerShadowView.swift
└── UIView.swift
├── SwiftyShadow.podspec
├── SwiftyShadow.xcodeproj
├── SwiftyShadow_Info.plist
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── WorkspaceSettings.xcsettings
└── xcshareddata
│ └── xcschemes
│ ├── SwiftyShadow.xcscheme
│ └── SwiftyShadowDemo.xcscheme
├── SwiftyShadow
└── Info.plist
├── SwiftyShadowDemo
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ └── avatar2.imageset
│ │ ├── Contents.json
│ │ └── avatar2.jpeg
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── EllipticalShadowViewController.swift
├── Info.plist
├── InnerShadowViewController.swift
└── OutterShadowViewController.swift
├── TODO.md
└── Tutorial
└── storyboard.png
/.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 | .build/
41 |
42 | # CocoaPods
43 | #
44 | # We recommend against adding the Pods directory to your .gitignore. However
45 | # you should judge for yourself, the pros and cons are mentioned at:
46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
47 | #
48 | # Pods/
49 |
50 | # Carthage
51 | #
52 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
53 | # Carthage/Checkouts
54 |
55 | Carthage/Build
56 |
57 | # fastlane
58 | #
59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
60 | # screenshots whenever they are needed.
61 | # For more information about the recommended setup visit:
62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
63 |
64 | fastlane/report.xml
65 | fastlane/Preview.html
66 | fastlane/screenshots
67 | fastlane/test_output
68 | #SwiftyShadow.xcodeproj/xcshareddata
69 |
--------------------------------------------------------------------------------
/.swift-version:
--------------------------------------------------------------------------------
1 | 4.2
2 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | osx_image: xcode9
3 |
4 | script:
5 | - xcodebuild build -project SwiftyShadow.xcodeproj -scheme SwiftyShadow -sdk iphonesimulator
6 | - xcodebuild build -project SwiftyShadow.xcodeproj -scheme SwiftyShadowDemo -sdk iphonesimulator
7 | - xcodebuild build -project SwiftyShadow.xcodeproj -scheme SwiftyShadow -sdk iphoneos
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Trần Minh Luận
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 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:3.1
2 |
3 | import PackageDescription
4 |
5 | let package = Package(
6 | name: "SwiftyShadow"
7 | )
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SwiftyShadow
2 |
3 | [](https://www.codacy.com/app/noblakit01/SwiftyShadow?utm_source=github.com&utm_medium=referral&utm_content=noblakit01/SwiftyShadow&utm_campaign=badger)
4 |
5 | Helper Libraries to generate wonderful shadow in Swift iOS.
6 |
7 | ## Screenshots
8 |
9 |
10 |
11 |
12 |
13 | |
14 |
15 |
16 | |
17 |
18 |
19 | |
20 |
21 |
22 |
23 | ## Requirements
24 |
25 | * iOS 8.0+
26 | * Xcode 8+
27 | * Swift 4.2
28 |
29 | ## Installation
30 |
31 | ### CocoaPods
32 |
33 | To integrate PhotoCollectionView into your Xcode project using CocoaPods, specify it in your `Podfile`:
34 |
35 | ```ruby
36 | source 'https://github.com/CocoaPods/Specs.git'
37 | platform :ios, '8.0'
38 | use_frameworks!
39 |
40 | pod 'SwiftyShadow', '~> 1.7.0'
41 | ```
42 |
43 | Then, run the following command:
44 |
45 | ```bash
46 | $ pod install
47 | ```
48 |
49 | ### Manually
50 | - Drag and drop `Sources` folder into your project.
51 |
52 | ## Usage
53 |
54 | ### Inner Shadow in View
55 | Use `SwiftyInnerShadowView` class as UIView to make this View has inner shadow.
56 |
57 | - Use Storyboard
58 |
59 | Set SwiftyInnerShadowView as UIView Class in the storyboard:
60 |
61 |
62 |
63 |
64 | |
65 |
66 |
67 |
68 | then make an outlet
69 | ```
70 | @IBOutlet weak var testView: SwiftyInnerShadowView!
71 | ```
72 |
73 |
74 | - inner shadow properties
75 | Set inner shadow propeties through `shadowLayer` of `SwiftyInnerShadowView`
76 | ```
77 | testView.shadowLayer.shadowRadius = 4
78 | testView.shadowLayer.shadowColor = UIColor.red.cgColor
79 | testView.shadowLayer.shadowOpacity = 0.8
80 | testView.shadowLayer.shadowOffset = CGSize.zero
81 | testView.cornerRadius = 120
82 | ```
83 |
84 | ### Outer Shadow in View
85 | You can set up outer shadow in view with default properties in UIView
86 | ```
87 | imageView.layer.cornerRadius = 120
88 | imageView.layer.shadowRadius = 20
89 | imageView.layer.shadowOpacity = 0.8
90 | imageView.layer.shadowColor = UIColor.black.cgColor
91 | imageView.layer.shadowOffset = CGSize.zero
92 | ```
93 |
94 | but shadow doesn't work if view has `clipsToBounds = true`, so just call `generateOuterShadow` function
95 | ```
96 | imageView.generateOuterShadow()
97 | ```
98 |
99 | ### Elliptical Shadow
100 | You need set up shadow properties first, then call `generateEllipticalShadow`
101 | ```
102 | imageView.layer.shadowRadius = 20
103 | imageView.layer.shadowOpacity = 0.8
104 | imageView.layer.shadowColor = UIColor.black.cgColor
105 | imageView.layer.shadowOffset = CGSize.zero
106 |
107 | imageView.generateEllipticalShadow()
108 | ```
109 |
110 | ## TODO
111 | [Todo](https://github.com/noblakit01/SwiftyShadow/blob/master/TODO.md)
112 | ## License
113 | [MIT](http://thi.mit-license.org/)
114 |
--------------------------------------------------------------------------------
/Screenshot/elliptical_shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/noblakit01/SwiftyShadow/b36513cc31ebb0b4793f87522b40cbd6aad1fab5/Screenshot/elliptical_shadow.png
--------------------------------------------------------------------------------
/Screenshot/inner_shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/noblakit01/SwiftyShadow/b36513cc31ebb0b4793f87522b40cbd6aad1fab5/Screenshot/inner_shadow.png
--------------------------------------------------------------------------------
/Screenshot/outer_shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/noblakit01/SwiftyShadow/b36513cc31ebb0b4793f87522b40cbd6aad1fab5/Screenshot/outer_shadow.png
--------------------------------------------------------------------------------
/Sources/SwiftyInnerShadowLayer.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyInnerShadowLayer.swift
3 | // SwiftyShadowExample
4 | //
5 | // Created by luan on 7/11/17.
6 | // Copyright © 2017 luantran. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public class SwiftyInnerShadowLayer: CAShapeLayer {
12 |
13 | override init() {
14 | super.init()
15 | initShadow()
16 | }
17 |
18 | override public init(layer: Any) {
19 | super.init(layer: layer)
20 | }
21 |
22 | required public init?(coder aDecoder: NSCoder) {
23 | super.init(coder: aDecoder)
24 | initShadow()
25 | }
26 |
27 | override public var shadowOffset: CGSize {
28 | didSet {
29 | setNeedsLayout()
30 | }
31 | }
32 |
33 | override public var shadowOpacity: Float {
34 | didSet {
35 | setNeedsLayout()
36 | }
37 | }
38 |
39 | override public var shadowRadius: CGFloat {
40 | didSet {
41 | setNeedsLayout()
42 | }
43 | }
44 |
45 | override public var shadowColor: CGColor? {
46 | didSet {
47 | setNeedsLayout()
48 | }
49 | }
50 |
51 | func initShadow() {
52 | masksToBounds = true
53 | shouldRasterize = true
54 |
55 | fillRule = CAShapeLayerFillRule.evenOdd
56 | borderColor = UIColor.clear.cgColor
57 | }
58 |
59 | override public func layoutSublayers() {
60 | super.layoutSublayers()
61 |
62 | generateShadowPath()
63 | }
64 |
65 | func generateShadowPath() {
66 | let top = shadowRadius - shadowOffset.height
67 | let bottom = shadowRadius + shadowOffset.height
68 | let left = shadowRadius - shadowOffset.width
69 | let right = shadowRadius + shadowOffset.width
70 | let shadowRect = CGRect(x: bounds.origin.x - left,
71 | y: bounds.origin.y - top,
72 | width: bounds.width + left + right,
73 | height: bounds.height + top + bottom)
74 |
75 | let path = CGMutablePath()
76 | let delta: CGFloat = 1
77 | let rect = CGRect(x: bounds.origin.x - delta, y: bounds.origin.y - delta, width: bounds.width + delta * 2, height: bounds.height + delta * 2)
78 | let bezier: UIBezierPath = {
79 | if cornerRadius > 0 {
80 | return UIBezierPath(roundedRect: rect, cornerRadius: cornerRadius)
81 | } else {
82 | return UIBezierPath(rect: rect)
83 | }
84 | }()
85 | path.addPath(bezier.cgPath)
86 | path.addRect(shadowRect)
87 | path.closeSubpath()
88 | self.path = path
89 | }
90 |
91 | }
92 |
--------------------------------------------------------------------------------
/Sources/SwiftyInnerShadowView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyInnerShadowView.swift
3 | // SwiftyShadowExample
4 | //
5 | // Created by luan on 7/11/17.
6 | // Copyright © 2017 luantran. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class SwiftyInnerShadowView: UIView {
12 |
13 | open var shadowLayer = SwiftyInnerShadowLayer()
14 |
15 | override open var bounds: CGRect {
16 | didSet {
17 | shadowLayer.frame = bounds
18 | }
19 | }
20 |
21 | override open var frame: CGRect {
22 | didSet {
23 | shadowLayer.frame = bounds
24 | }
25 | }
26 |
27 | open var cornerRadius: CGFloat = 0 {
28 | didSet {
29 | layer.cornerRadius = cornerRadius
30 | shadowLayer.cornerRadius = cornerRadius
31 | }
32 | }
33 |
34 | override init(frame: CGRect) {
35 | super.init(frame: frame)
36 | initShadowLayer()
37 | }
38 |
39 | required public init?(coder aDecoder: NSCoder) {
40 | super.init(coder: aDecoder)
41 | initShadowLayer()
42 | }
43 |
44 | fileprivate func initShadowLayer() {
45 | layer.addSublayer(shadowLayer)
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/Sources/UIView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIView.swift
3 | // SwiftyShadow
4 | //
5 | // Created by luan on 7/23/17.
6 | //
7 | //
8 |
9 | import UIKit
10 |
11 | extension UIView {
12 |
13 | open func generateOuterShadow() {
14 | let view = UIView()
15 | view.translatesAutoresizingMaskIntoConstraints = false
16 | view.layer.cornerRadius = layer.cornerRadius
17 | view.layer.shadowRadius = layer.shadowRadius
18 | view.layer.shadowOpacity = layer.shadowOpacity
19 | view.layer.shadowColor = layer.shadowColor
20 | view.layer.shadowOffset = layer.shadowOffset
21 | view.clipsToBounds = false
22 | view.backgroundColor = .white
23 |
24 | superview?.insertSubview(view, belowSubview: self)
25 |
26 | let constraints = [
27 | NSLayoutConstraint(item: view, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1.0, constant: 0.0),
28 | NSLayoutConstraint(item: view, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1.0, constant: 0.0),
29 | NSLayoutConstraint(item: view, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant: 0.0),
30 | NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: 0.0),
31 | ]
32 | superview?.addConstraints(constraints)
33 | }
34 |
35 | open func generateInnerShadow() {
36 | let view = SwiftyInnerShadowView()
37 | view.translatesAutoresizingMaskIntoConstraints = false
38 | view.shadowLayer.cornerRadius = layer.cornerRadius
39 | view.shadowLayer.shadowRadius = layer.shadowRadius
40 | view.shadowLayer.shadowOpacity = layer.shadowOpacity
41 | view.shadowLayer.shadowColor = layer.shadowColor
42 | view.shadowLayer.shadowOffset = layer.shadowOffset
43 | view.clipsToBounds = false
44 | view.backgroundColor = .clear
45 |
46 | superview?.insertSubview(view, aboveSubview: self)
47 |
48 | let constraints = [
49 | NSLayoutConstraint(item: view, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1.0, constant: 0.0),
50 | NSLayoutConstraint(item: view, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1.0, constant: 0.0),
51 | NSLayoutConstraint(item: view, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant: 0.0),
52 | NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: 0.0),
53 | ]
54 | superview?.addConstraints(constraints)
55 | }
56 |
57 | open func generateEllipticalShadow() {
58 | let view = UIView()
59 | view.translatesAutoresizingMaskIntoConstraints = false
60 | view.layer.cornerRadius = layer.cornerRadius
61 | view.layer.shadowRadius = layer.shadowRadius
62 | view.layer.shadowOpacity = layer.shadowOpacity
63 | view.layer.shadowColor = layer.shadowColor
64 | view.layer.shadowOffset = layer.shadowOffset
65 | view.clipsToBounds = false
66 | view.backgroundColor = .white
67 |
68 | let ovalRect = CGRect(x: 0, y: frame.size.height + 10, width: frame.size.width, height: 15)
69 | let path = UIBezierPath(ovalIn: ovalRect)
70 |
71 | view.layer.shadowPath = path.cgPath
72 |
73 | superview?.insertSubview(view, belowSubview: self)
74 |
75 | let constraints = [
76 | NSLayoutConstraint(item: view, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1.0, constant: 0.0),
77 | NSLayoutConstraint(item: view, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1.0, constant: 0.0),
78 | NSLayoutConstraint(item: view, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant: 0.0),
79 | NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: 0.0),
80 | ]
81 | superview?.addConstraints(constraints)
82 | }
83 |
84 | }
85 |
--------------------------------------------------------------------------------
/SwiftyShadow.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod spec lint SwiftyShadow.podspec' to ensure this is a
3 | # valid spec and to remove all comments including this before submitting the spec.
4 | #
5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
7 | #
8 |
9 | Pod::Spec.new do |s|
10 |
11 | s.name = "SwiftyShadow"
12 | s.version = "1.7.0"
13 | s.summary = "Shadow for UIView in Swift iOS"
14 | s.description = <<-DESC
15 | Simple and highly shadow for UIView in Swift iOS
16 | DESC
17 |
18 | s.homepage = "https://github.com/noblakit01/SwiftyShadow"
19 | s.license = "MIT"
20 |
21 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
22 | s.author = { "noblakit" => "noblakit01@gmail.com" }
23 |
24 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
25 |
26 | s.platform = :ios, "8.0"
27 |
28 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
29 | s.source = { :git => "https://github.com/noblakit01/SwiftyShadow.git", :tag => s.version }
30 |
31 |
32 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
33 | s.source_files = "Sources/*.swift"
34 | s.requires_arc = true
35 | s.swift_version = "4.2"
36 |
37 | end
38 |
--------------------------------------------------------------------------------
/SwiftyShadow.xcodeproj/SwiftyShadow_Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CFBundleDevelopmentRegion
5 | en
6 | CFBundleExecutable
7 | $(EXECUTABLE_NAME)
8 | CFBundleIdentifier
9 | $(PRODUCT_BUNDLE_IDENTIFIER)
10 | CFBundleInfoDictionaryVersion
11 | 6.0
12 | CFBundleName
13 | $(PRODUCT_NAME)
14 | CFBundlePackageType
15 | FMWK
16 | CFBundleShortVersionString
17 | 1.0
18 | CFBundleSignature
19 | ????
20 | CFBundleVersion
21 | $(CURRENT_PROJECT_VERSION)
22 | NSPrincipalClass
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/SwiftyShadow.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 0F4640E01F24F70A00B1FDFA /* UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F4640DF1F24F70A00B1FDFA /* UIView.swift */; };
11 | 0F826A3D1F2112CE0088917B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F826A3C1F2112CE0088917B /* AppDelegate.swift */; };
12 | 0F826A421F2112CE0088917B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F826A401F2112CE0088917B /* Main.storyboard */; };
13 | 0F826A441F2112CE0088917B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0F826A431F2112CE0088917B /* Assets.xcassets */; };
14 | 0F826A471F2112CE0088917B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F826A451F2112CE0088917B /* LaunchScreen.storyboard */; };
15 | 74E0B8CB1FADF87A000F8879 /* InnerShadowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74E0B8CA1FADF87A000F8879 /* InnerShadowViewController.swift */; };
16 | 74E0B8CD1FADF8A7000F8879 /* OutterShadowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74E0B8CC1FADF8A7000F8879 /* OutterShadowViewController.swift */; };
17 | 74E0B8CF1FADF9A3000F8879 /* EllipticalShadowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74E0B8CE1FADF9A3000F8879 /* EllipticalShadowViewController.swift */; };
18 | OBJ_23 /* SwiftyInnerShadowLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_8 /* SwiftyInnerShadowLayer.swift */; };
19 | OBJ_24 /* SwiftyInnerShadowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* SwiftyInnerShadowView.swift */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXContainerItemProxy section */
23 | 0F826A4C1F2116F40088917B /* PBXContainerItemProxy */ = {
24 | isa = PBXContainerItemProxy;
25 | containerPortal = OBJ_1 /* Project object */;
26 | proxyType = 1;
27 | remoteGlobalIDString = OBJ_18;
28 | remoteInfo = SwiftyShadow;
29 | };
30 | /* End PBXContainerItemProxy section */
31 |
32 | /* Begin PBXFileReference section */
33 | 0F4640DF1F24F70A00B1FDFA /* UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIView.swift; sourceTree = ""; };
34 | 0F826A3A1F2112CE0088917B /* SwiftyShadowDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftyShadowDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
35 | 0F826A3C1F2112CE0088917B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
36 | 0F826A411F2112CE0088917B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
37 | 0F826A431F2112CE0088917B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
38 | 0F826A461F2112CE0088917B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
39 | 0F826A481F2112CE0088917B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
40 | 74E0B8CA1FADF87A000F8879 /* InnerShadowViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InnerShadowViewController.swift; sourceTree = ""; };
41 | 74E0B8CC1FADF8A7000F8879 /* OutterShadowViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OutterShadowViewController.swift; sourceTree = ""; };
42 | 74E0B8CE1FADF9A3000F8879 /* EllipticalShadowViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EllipticalShadowViewController.swift; sourceTree = ""; };
43 | 74FF13BF2320EE0900054199 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
44 | OBJ_17 /* SwiftyShadow.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftyShadow.framework; sourceTree = BUILT_PRODUCTS_DIR; };
45 | OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; };
46 | OBJ_8 /* SwiftyInnerShadowLayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftyInnerShadowLayer.swift; sourceTree = ""; };
47 | OBJ_9 /* SwiftyInnerShadowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftyInnerShadowView.swift; sourceTree = ""; };
48 | /* End PBXFileReference section */
49 |
50 | /* Begin PBXFrameworksBuildPhase section */
51 | 0F826A371F2112CE0088917B /* Frameworks */ = {
52 | isa = PBXFrameworksBuildPhase;
53 | buildActionMask = 2147483647;
54 | files = (
55 | );
56 | runOnlyForDeploymentPostprocessing = 0;
57 | };
58 | OBJ_25 /* Frameworks */ = {
59 | isa = PBXFrameworksBuildPhase;
60 | buildActionMask = 0;
61 | files = (
62 | );
63 | runOnlyForDeploymentPostprocessing = 0;
64 | };
65 | /* End PBXFrameworksBuildPhase section */
66 |
67 | /* Begin PBXGroup section */
68 | 0F826A3B1F2112CE0088917B /* SwiftyShadowDemo */ = {
69 | isa = PBXGroup;
70 | children = (
71 | 0F826A3C1F2112CE0088917B /* AppDelegate.swift */,
72 | 0F826A401F2112CE0088917B /* Main.storyboard */,
73 | 0F826A431F2112CE0088917B /* Assets.xcassets */,
74 | 0F826A451F2112CE0088917B /* LaunchScreen.storyboard */,
75 | 0F826A481F2112CE0088917B /* Info.plist */,
76 | 74E0B8CA1FADF87A000F8879 /* InnerShadowViewController.swift */,
77 | 74E0B8CC1FADF8A7000F8879 /* OutterShadowViewController.swift */,
78 | 74E0B8CE1FADF9A3000F8879 /* EllipticalShadowViewController.swift */,
79 | );
80 | path = SwiftyShadowDemo;
81 | sourceTree = "";
82 | };
83 | 740495FA2323B90600803325 /* SwiftyShadow */ = {
84 | isa = PBXGroup;
85 | children = (
86 | 74FF13BF2320EE0900054199 /* Info.plist */,
87 | );
88 | path = SwiftyShadow;
89 | sourceTree = "";
90 | };
91 | OBJ_10 /* Tests */ = {
92 | isa = PBXGroup;
93 | children = (
94 | );
95 | name = Tests;
96 | sourceTree = SOURCE_ROOT;
97 | };
98 | OBJ_16 /* Products */ = {
99 | isa = PBXGroup;
100 | children = (
101 | OBJ_17 /* SwiftyShadow.framework */,
102 | 0F826A3A1F2112CE0088917B /* SwiftyShadowDemo.app */,
103 | );
104 | name = Products;
105 | sourceTree = BUILT_PRODUCTS_DIR;
106 | };
107 | OBJ_5 = {
108 | isa = PBXGroup;
109 | children = (
110 | 740495FA2323B90600803325 /* SwiftyShadow */,
111 | OBJ_6 /* Package.swift */,
112 | OBJ_7 /* Sources */,
113 | OBJ_10 /* Tests */,
114 | 0F826A3B1F2112CE0088917B /* SwiftyShadowDemo */,
115 | OBJ_16 /* Products */,
116 | );
117 | sourceTree = "";
118 | };
119 | OBJ_7 /* Sources */ = {
120 | isa = PBXGroup;
121 | children = (
122 | OBJ_8 /* SwiftyInnerShadowLayer.swift */,
123 | OBJ_9 /* SwiftyInnerShadowView.swift */,
124 | 0F4640DF1F24F70A00B1FDFA /* UIView.swift */,
125 | );
126 | path = Sources;
127 | sourceTree = SOURCE_ROOT;
128 | };
129 | /* End PBXGroup section */
130 |
131 | /* Begin PBXNativeTarget section */
132 | 0F826A391F2112CE0088917B /* SwiftyShadowDemo */ = {
133 | isa = PBXNativeTarget;
134 | buildConfigurationList = 0F826A4B1F2112CE0088917B /* Build configuration list for PBXNativeTarget "SwiftyShadowDemo" */;
135 | buildPhases = (
136 | 0F826A361F2112CE0088917B /* Sources */,
137 | 0F826A371F2112CE0088917B /* Frameworks */,
138 | 0F826A381F2112CE0088917B /* Resources */,
139 | );
140 | buildRules = (
141 | );
142 | dependencies = (
143 | 0F826A4D1F2116F40088917B /* PBXTargetDependency */,
144 | );
145 | name = SwiftyShadowDemo;
146 | productName = SwiftyShadowDemo;
147 | productReference = 0F826A3A1F2112CE0088917B /* SwiftyShadowDemo.app */;
148 | productType = "com.apple.product-type.application";
149 | };
150 | OBJ_18 /* SwiftyShadow */ = {
151 | isa = PBXNativeTarget;
152 | buildConfigurationList = OBJ_19 /* Build configuration list for PBXNativeTarget "SwiftyShadow" */;
153 | buildPhases = (
154 | OBJ_22 /* Sources */,
155 | OBJ_25 /* Frameworks */,
156 | );
157 | buildRules = (
158 | );
159 | dependencies = (
160 | );
161 | name = SwiftyShadow;
162 | productName = SwiftyShadow;
163 | productReference = OBJ_17 /* SwiftyShadow.framework */;
164 | productType = "com.apple.product-type.framework";
165 | };
166 | /* End PBXNativeTarget section */
167 |
168 | /* Begin PBXProject section */
169 | OBJ_1 /* Project object */ = {
170 | isa = PBXProject;
171 | attributes = {
172 | LastSwiftUpdateCheck = 0830;
173 | LastUpgradeCheck = 9999;
174 | TargetAttributes = {
175 | 0F826A391F2112CE0088917B = {
176 | CreatedOnToolsVersion = 8.3.2;
177 | DevelopmentTeam = TMH6L6FX6W;
178 | ProvisioningStyle = Automatic;
179 | };
180 | OBJ_18 = {
181 | DevelopmentTeam = TMH6L6FX6W;
182 | LastSwiftMigration = 0900;
183 | ProvisioningStyle = Automatic;
184 | };
185 | };
186 | };
187 | buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "SwiftyShadow" */;
188 | compatibilityVersion = "Xcode 3.2";
189 | developmentRegion = English;
190 | hasScannedForEncodings = 0;
191 | knownRegions = (
192 | English,
193 | en,
194 | Base,
195 | );
196 | mainGroup = OBJ_5;
197 | productRefGroup = OBJ_16 /* Products */;
198 | projectDirPath = "";
199 | projectRoot = "";
200 | targets = (
201 | OBJ_18 /* SwiftyShadow */,
202 | 0F826A391F2112CE0088917B /* SwiftyShadowDemo */,
203 | );
204 | };
205 | /* End PBXProject section */
206 |
207 | /* Begin PBXResourcesBuildPhase section */
208 | 0F826A381F2112CE0088917B /* Resources */ = {
209 | isa = PBXResourcesBuildPhase;
210 | buildActionMask = 2147483647;
211 | files = (
212 | 0F826A471F2112CE0088917B /* LaunchScreen.storyboard in Resources */,
213 | 0F826A441F2112CE0088917B /* Assets.xcassets in Resources */,
214 | 0F826A421F2112CE0088917B /* Main.storyboard in Resources */,
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | };
218 | /* End PBXResourcesBuildPhase section */
219 |
220 | /* Begin PBXSourcesBuildPhase section */
221 | 0F826A361F2112CE0088917B /* Sources */ = {
222 | isa = PBXSourcesBuildPhase;
223 | buildActionMask = 2147483647;
224 | files = (
225 | 74E0B8CF1FADF9A3000F8879 /* EllipticalShadowViewController.swift in Sources */,
226 | 74E0B8CB1FADF87A000F8879 /* InnerShadowViewController.swift in Sources */,
227 | 74E0B8CD1FADF8A7000F8879 /* OutterShadowViewController.swift in Sources */,
228 | 0F826A3D1F2112CE0088917B /* AppDelegate.swift in Sources */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | OBJ_22 /* Sources */ = {
233 | isa = PBXSourcesBuildPhase;
234 | buildActionMask = 0;
235 | files = (
236 | OBJ_23 /* SwiftyInnerShadowLayer.swift in Sources */,
237 | 0F4640E01F24F70A00B1FDFA /* UIView.swift in Sources */,
238 | OBJ_24 /* SwiftyInnerShadowView.swift in Sources */,
239 | );
240 | runOnlyForDeploymentPostprocessing = 0;
241 | };
242 | /* End PBXSourcesBuildPhase section */
243 |
244 | /* Begin PBXTargetDependency section */
245 | 0F826A4D1F2116F40088917B /* PBXTargetDependency */ = {
246 | isa = PBXTargetDependency;
247 | target = OBJ_18 /* SwiftyShadow */;
248 | targetProxy = 0F826A4C1F2116F40088917B /* PBXContainerItemProxy */;
249 | };
250 | /* End PBXTargetDependency section */
251 |
252 | /* Begin PBXVariantGroup section */
253 | 0F826A401F2112CE0088917B /* Main.storyboard */ = {
254 | isa = PBXVariantGroup;
255 | children = (
256 | 0F826A411F2112CE0088917B /* Base */,
257 | );
258 | name = Main.storyboard;
259 | sourceTree = "";
260 | };
261 | 0F826A451F2112CE0088917B /* LaunchScreen.storyboard */ = {
262 | isa = PBXVariantGroup;
263 | children = (
264 | 0F826A461F2112CE0088917B /* Base */,
265 | );
266 | name = LaunchScreen.storyboard;
267 | sourceTree = "";
268 | };
269 | /* End PBXVariantGroup section */
270 |
271 | /* Begin XCBuildConfiguration section */
272 | 0F826A491F2112CE0088917B /* Debug */ = {
273 | isa = XCBuildConfiguration;
274 | buildSettings = {
275 | ALWAYS_SEARCH_USER_PATHS = NO;
276 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
277 | CLANG_ANALYZER_NONNULL = YES;
278 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
279 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
280 | CLANG_CXX_LIBRARY = "libc++";
281 | CLANG_ENABLE_MODULES = YES;
282 | CLANG_WARN_BOOL_CONVERSION = YES;
283 | CLANG_WARN_CONSTANT_CONVERSION = YES;
284 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
285 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
286 | CLANG_WARN_EMPTY_BODY = YES;
287 | CLANG_WARN_ENUM_CONVERSION = YES;
288 | CLANG_WARN_INFINITE_RECURSION = YES;
289 | CLANG_WARN_INT_CONVERSION = YES;
290 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
291 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
292 | CLANG_WARN_UNREACHABLE_CODE = YES;
293 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
294 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
295 | DEVELOPMENT_TEAM = TMH6L6FX6W;
296 | ENABLE_STRICT_OBJC_MSGSEND = YES;
297 | ENABLE_TESTABILITY = YES;
298 | GCC_C_LANGUAGE_STANDARD = gnu99;
299 | GCC_DYNAMIC_NO_PIC = NO;
300 | GCC_NO_COMMON_BLOCKS = YES;
301 | GCC_PREPROCESSOR_DEFINITIONS = (
302 | "DEBUG=1",
303 | "$(inherited)",
304 | );
305 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
306 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
307 | GCC_WARN_UNDECLARED_SELECTOR = YES;
308 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
309 | GCC_WARN_UNUSED_FUNCTION = YES;
310 | GCC_WARN_UNUSED_VARIABLE = YES;
311 | INFOPLIST_FILE = SwiftyShadowDemo/Info.plist;
312 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
313 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
314 | MTL_ENABLE_DEBUG_INFO = YES;
315 | PRODUCT_BUNDLE_IDENTIFIER = com.luantran.SwiftyShadowDemo;
316 | PRODUCT_NAME = "$(TARGET_NAME)";
317 | SDKROOT = iphoneos;
318 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
319 | SWIFT_VERSION = 3.0;
320 | };
321 | name = Debug;
322 | };
323 | 0F826A4A1F2112CE0088917B /* Release */ = {
324 | isa = XCBuildConfiguration;
325 | buildSettings = {
326 | ALWAYS_SEARCH_USER_PATHS = NO;
327 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
328 | CLANG_ANALYZER_NONNULL = YES;
329 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
330 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
331 | CLANG_CXX_LIBRARY = "libc++";
332 | CLANG_ENABLE_MODULES = YES;
333 | CLANG_WARN_BOOL_CONVERSION = YES;
334 | CLANG_WARN_CONSTANT_CONVERSION = YES;
335 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
336 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
337 | CLANG_WARN_EMPTY_BODY = YES;
338 | CLANG_WARN_ENUM_CONVERSION = YES;
339 | CLANG_WARN_INFINITE_RECURSION = YES;
340 | CLANG_WARN_INT_CONVERSION = YES;
341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
342 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
343 | CLANG_WARN_UNREACHABLE_CODE = YES;
344 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
345 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
346 | COPY_PHASE_STRIP = NO;
347 | DEVELOPMENT_TEAM = TMH6L6FX6W;
348 | ENABLE_NS_ASSERTIONS = NO;
349 | ENABLE_STRICT_OBJC_MSGSEND = YES;
350 | GCC_C_LANGUAGE_STANDARD = gnu99;
351 | GCC_NO_COMMON_BLOCKS = YES;
352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
353 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
354 | GCC_WARN_UNDECLARED_SELECTOR = YES;
355 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
356 | GCC_WARN_UNUSED_FUNCTION = YES;
357 | GCC_WARN_UNUSED_VARIABLE = YES;
358 | INFOPLIST_FILE = SwiftyShadowDemo/Info.plist;
359 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
360 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
361 | MTL_ENABLE_DEBUG_INFO = NO;
362 | PRODUCT_BUNDLE_IDENTIFIER = com.luantran.SwiftyShadowDemo;
363 | PRODUCT_NAME = "$(TARGET_NAME)";
364 | SDKROOT = iphoneos;
365 | SWIFT_VERSION = 3.0;
366 | VALIDATE_PRODUCT = YES;
367 | };
368 | name = Release;
369 | };
370 | OBJ_20 /* Debug */ = {
371 | isa = XCBuildConfiguration;
372 | buildSettings = {
373 | CODE_SIGN_IDENTITY = "iPhone Developer";
374 | CODE_SIGN_STYLE = Automatic;
375 | DEVELOPMENT_TEAM = TMH6L6FX6W;
376 | ENABLE_TESTABILITY = YES;
377 | FRAMEWORK_SEARCH_PATHS = (
378 | "$(inherited)",
379 | "$(PLATFORM_DIR)/Developer/Library/Frameworks",
380 | );
381 | HEADER_SEARCH_PATHS = "$(inherited)";
382 | INFOPLIST_FILE = SwiftyShadow/Info.plist;
383 | LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
384 | OTHER_LDFLAGS = "$(inherited)";
385 | OTHER_SWIFT_FLAGS = "$(inherited)";
386 | PRODUCT_BUNDLE_IDENTIFIER = com.luantran.swiftyshadow;
387 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
388 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
389 | PROVISIONING_PROFILE_SPECIFIER = "";
390 | SKIP_INSTALL = YES;
391 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
392 | SWIFT_VERSION = 4.2;
393 | TARGET_NAME = SwiftyShadow;
394 | };
395 | name = Debug;
396 | };
397 | OBJ_21 /* Release */ = {
398 | isa = XCBuildConfiguration;
399 | buildSettings = {
400 | CODE_SIGN_IDENTITY = "iPhone Developer";
401 | CODE_SIGN_STYLE = Automatic;
402 | DEVELOPMENT_TEAM = TMH6L6FX6W;
403 | ENABLE_TESTABILITY = YES;
404 | FRAMEWORK_SEARCH_PATHS = (
405 | "$(inherited)",
406 | "$(PLATFORM_DIR)/Developer/Library/Frameworks",
407 | );
408 | HEADER_SEARCH_PATHS = "$(inherited)";
409 | INFOPLIST_FILE = SwiftyShadow/Info.plist;
410 | LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
411 | OTHER_LDFLAGS = "$(inherited)";
412 | OTHER_SWIFT_FLAGS = "$(inherited)";
413 | PRODUCT_BUNDLE_IDENTIFIER = com.luantran.swiftyshadow;
414 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
415 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
416 | PROVISIONING_PROFILE_SPECIFIER = "";
417 | SKIP_INSTALL = YES;
418 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
419 | SWIFT_VERSION = 4.2;
420 | TARGET_NAME = SwiftyShadow;
421 | };
422 | name = Release;
423 | };
424 | OBJ_3 /* Debug */ = {
425 | isa = XCBuildConfiguration;
426 | buildSettings = {
427 | CLANG_ENABLE_OBJC_ARC = YES;
428 | COMBINE_HIDPI_IMAGES = YES;
429 | COPY_PHASE_STRIP = NO;
430 | DEBUG_INFORMATION_FORMAT = dwarf;
431 | DYLIB_INSTALL_NAME_BASE = "@rpath";
432 | ENABLE_NS_ASSERTIONS = YES;
433 | GCC_OPTIMIZATION_LEVEL = 0;
434 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
435 | MACOSX_DEPLOYMENT_TARGET = 10.10;
436 | ONLY_ACTIVE_ARCH = YES;
437 | OTHER_SWIFT_FLAGS = "-DXcode";
438 | PRODUCT_NAME = "$(TARGET_NAME)";
439 | SDKROOT = iphoneos;
440 | SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
441 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
442 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
443 | SWIFT_VERSION = 3.0;
444 | USE_HEADERMAP = NO;
445 | };
446 | name = Debug;
447 | };
448 | OBJ_4 /* Release */ = {
449 | isa = XCBuildConfiguration;
450 | buildSettings = {
451 | CLANG_ENABLE_OBJC_ARC = YES;
452 | COMBINE_HIDPI_IMAGES = YES;
453 | COPY_PHASE_STRIP = YES;
454 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
455 | DYLIB_INSTALL_NAME_BASE = "@rpath";
456 | GCC_OPTIMIZATION_LEVEL = s;
457 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
458 | MACOSX_DEPLOYMENT_TARGET = 10.10;
459 | OTHER_SWIFT_FLAGS = "-DXcode";
460 | PRODUCT_NAME = "$(TARGET_NAME)";
461 | SDKROOT = iphoneos;
462 | SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
463 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
464 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
465 | SWIFT_VERSION = 3.0;
466 | USE_HEADERMAP = NO;
467 | };
468 | name = Release;
469 | };
470 | /* End XCBuildConfiguration section */
471 |
472 | /* Begin XCConfigurationList section */
473 | 0F826A4B1F2112CE0088917B /* Build configuration list for PBXNativeTarget "SwiftyShadowDemo" */ = {
474 | isa = XCConfigurationList;
475 | buildConfigurations = (
476 | 0F826A491F2112CE0088917B /* Debug */,
477 | 0F826A4A1F2112CE0088917B /* Release */,
478 | );
479 | defaultConfigurationIsVisible = 0;
480 | defaultConfigurationName = Debug;
481 | };
482 | OBJ_19 /* Build configuration list for PBXNativeTarget "SwiftyShadow" */ = {
483 | isa = XCConfigurationList;
484 | buildConfigurations = (
485 | OBJ_20 /* Debug */,
486 | OBJ_21 /* Release */,
487 | );
488 | defaultConfigurationIsVisible = 0;
489 | defaultConfigurationName = Debug;
490 | };
491 | OBJ_2 /* Build configuration list for PBXProject "SwiftyShadow" */ = {
492 | isa = XCConfigurationList;
493 | buildConfigurations = (
494 | OBJ_3 /* Debug */,
495 | OBJ_4 /* Release */,
496 | );
497 | defaultConfigurationIsVisible = 0;
498 | defaultConfigurationName = Debug;
499 | };
500 | /* End XCConfigurationList section */
501 | };
502 | rootObject = OBJ_1 /* Project object */;
503 | }
504 |
--------------------------------------------------------------------------------
/SwiftyShadow.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SwiftyShadow.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SwiftyShadow.xcodeproj/xcshareddata/xcschemes/SwiftyShadow.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
59 |
60 |
61 |
67 |
68 |
74 |
75 |
76 |
77 |
79 |
80 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/SwiftyShadow.xcodeproj/xcshareddata/xcschemes/SwiftyShadowDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/SwiftyShadow/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 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/SwiftyShadowDemo/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // SwiftyShadowDemo
4 | //
5 | // Created by luan on 7/20/17.
6 | //
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: [UIApplicationLaunchOptionsKey: 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 |
--------------------------------------------------------------------------------
/SwiftyShadowDemo/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 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | }
43 | ],
44 | "info" : {
45 | "version" : 1,
46 | "author" : "xcode"
47 | }
48 | }
--------------------------------------------------------------------------------
/SwiftyShadowDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/SwiftyShadowDemo/Assets.xcassets/avatar2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "avatar2.jpeg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/SwiftyShadowDemo/Assets.xcassets/avatar2.imageset/avatar2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/noblakit01/SwiftyShadow/b36513cc31ebb0b4793f87522b40cbd6aad1fab5/SwiftyShadowDemo/Assets.xcassets/avatar2.imageset/avatar2.jpeg
--------------------------------------------------------------------------------
/SwiftyShadowDemo/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 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/SwiftyShadowDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | Noteworthy-Light
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
36 |
43 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
--------------------------------------------------------------------------------
/SwiftyShadowDemo/EllipticalShadowViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // EllipticalShadowViewController.swift
3 | // SwiftyShadowDemo
4 | //
5 | // Created by Minh Luan Tran on 11/4/17.
6 | //
7 |
8 | import UIKit
9 | import SwiftyShadow
10 |
11 | class EllipticalShadowViewController: UIViewController {
12 | @IBOutlet weak var imageView: UIImageView!
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | imageView.layer.cornerRadius = 120
18 | imageView.layer.shadowRadius = 20
19 | imageView.layer.shadowOpacity = 0.8
20 | imageView.layer.shadowColor = UIColor.black.cgColor
21 | imageView.layer.shadowOffset = CGSize.zero
22 |
23 | imageView.generateEllipticalShadow()
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/SwiftyShadowDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/SwiftyShadowDemo/InnerShadowViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InnerShadowViewController.swift
3 | // SwiftyShadowDemo
4 | //
5 | // Created by Minh Luan Tran on 11/4/17.
6 | //
7 |
8 | import UIKit
9 | import SwiftyShadow
10 |
11 | class InnerShadowViewController: UIViewController {
12 |
13 | @IBOutlet weak var testView: SwiftyInnerShadowView!
14 | @IBOutlet weak var imageInnerView: UIImageView!
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 |
19 | testView.shadowLayer.shadowRadius = 10
20 | testView.shadowLayer.shadowColor = UIColor.red.cgColor
21 | testView.shadowLayer.shadowOpacity = 0.8
22 | testView.shadowLayer.shadowOffset = CGSize.zero
23 | testView.cornerRadius = 120
24 |
25 | imageInnerView.layer.cornerRadius = 120
26 | imageInnerView.layer.shadowRadius = 20
27 | imageInnerView.layer.shadowOpacity = 0.8
28 | imageInnerView.layer.shadowColor = UIColor.black.cgColor
29 | imageInnerView.layer.shadowOffset = CGSize.zero
30 |
31 | imageInnerView.generateInnerShadow()
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/SwiftyShadowDemo/OutterShadowViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // OutterShadowViewController.swift
3 | // SwiftyShadowDemo
4 | //
5 | // Created by Minh Luan Tran on 11/4/17.
6 | //
7 |
8 | import UIKit
9 | import SwiftyShadow
10 |
11 | class OutterShadowViewController: UIViewController {
12 | @IBOutlet weak var imageView: UIImageView!
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | imageView.layer.cornerRadius = 120
18 | imageView.layer.shadowRadius = 20
19 | imageView.layer.shadowOpacity = 0.8
20 | imageView.layer.shadowColor = UIColor.black.cgColor
21 | imageView.layer.shadowOffset = CGSize.zero
22 |
23 | imageView.generateOuterShadow()
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/TODO.md:
--------------------------------------------------------------------------------
1 | # TODO
2 |
3 | - [x] Add convenience function in UIView for Inner Shadow.
4 | - [x] Add elliptical bottom shadow in UIView.
5 | - [ ] Create shadow properties system.
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Tutorial/storyboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/noblakit01/SwiftyShadow/b36513cc31ebb0b4793f87522b40cbd6aad1fab5/Tutorial/storyboard.png
--------------------------------------------------------------------------------