Skip to content

Commit b1f31b2

Browse files
authored
Merge pull request #6 from PierrePerrin/develop
Add Carthage
2 parents 6063c92 + 887ca3a commit b1f31b2

26 files changed

+181
-61
lines changed

README.md

Lines changed: 79 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,50 @@
22

33
> ShadowView is an iOS Shadow library that makes view's shadow implementation easy and sweet 🎉 🎊.
44
5-
[![Swift Version][swift-image]][swift-url] [![Build Status][travis-image]][travis-url] [![License][license-image]][license-url] [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/EZSwiftExtensions.svg)](https://img.shields.io/cocoapods/v/LFAlertController.svg) [![Platform](https://img.shields.io/cocoapods/p/LFAlertController.svg?style=flat)](http://cocoapods.org/pods/ShadowView)
5+
[![Swift Version][swift-image]][swift-url] [![Build Status][travis-image]][travis-url] [![License][license-image]][license-url] [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/EZSwiftExtensions.svg)](https://img.shields.io/cocoapods/v/LFAlertController.svg) [![Platform](https://img.shields.io/cocoapods/p/LFAlertController.svg?style=flat)](http://cocoapods.org/pods/ShadowView)
66

7-
----------
7+
---
88

99
Add simple shadows to add a gaussian blurred projection (as a shadow) to any **UIView**.
1010

1111
![][example-image]
12+
1213
## Table of contents
14+
1315
<!-- TOC depthFrom:2 depthTo:4 withLinks:1 updateOnSave:1 orderedList:0 -->
14-
- [Features](#features)
15-
- [Requirements](#requirements)
16-
- [Installation](#installation)
17-
- [CocoaPods](#cocoaPods)
18-
- [Manually](#manually)
19-
- [How it works](#how-it-works)
20-
- [Normal Shadows](#normal-shadows)
21-
- [Projected Gaussian Shadows](#projected-gaussian-shadows)
22-
- [Usage example](#usage-example)
23-
- [With Storyboard](#with-storyboard)
24-
- [Programmatically](#programmatically)
25-
- [Parameters](#parameters)
26-
- [Notes](#notes)
27-
- [Contribute](#contribute)
28-
- [Meta](#meta)
29-
<!-- /TOC -->
3016

17+
- [Features](#features)
18+
- [Requirements](#requirements)
19+
- [Installation](#installation)
20+
- [CocoaPods](#cocoaPods)
21+
- [Manually](#manually)
22+
- [How it works](#how-it-works)
23+
- [Normal Shadows](#normal-shadows)
24+
- [Projected Gaussian Shadows](#projected-gaussian-shadows)
25+
- [Usage example](#usage-example)
26+
- [With Storyboard](#with-storyboard)
27+
- [Programmatically](#programmatically)
28+
- [Parameters](#parameters)
29+
- [Notes](#notes)
30+
- [Contribute](#contribute)
31+
- [Meta](#meta)
32+
<!-- /TOC -->
3133

3234
## Features
3335

34-
- [x] Add shadow easily from the **storyboard** and **programmatically**.
35-
- [x] Add a gaussian blurred projection of your view (like iOS 10 music app).
36-
- [x] Customize the border width and border color of any view from storyboard .
36+
- [x] Add shadow easily from the **storyboard** and **programmatically**.
37+
- [x] Add a gaussian blurred projection of your view (like iOS 10 music app).
38+
- [x] Customize the border width and border color of any view from storyboard .
3739

3840
## Requirements
3941

40-
- iOS 9.0+
41-
- Xcode 8
42+
- iOS 9.0+
43+
- Xcode 8
4244

4345
## Installation
4446

45-
4647
#### CocoaPods
48+
4749
You can use [CocoaPods](http://cocoapods.org/) to install `ShadowView` by adding it to your `Podfile`:
4850

4951
```ruby
@@ -56,23 +58,44 @@ pod 'ShadowView'
5658
end
5759
```
5860

61+
#### Carthage
62+
63+
1. Install Carthage via Homebrew
64+
65+
```bash
66+
$ brew update
67+
$ brew install carthage
68+
```
69+
70+
2. Add `github "PierrePerrin/ShadowView"` to your Cartfile.
71+
72+
3. Run `carthage update`.
73+
74+
4. Drag `ShadowView.framework` from the `Carthage/Build/iOS/` directory to the `Linked Frameworks and Libraries` section of your Xcode project’s `General` settings.
75+
76+
5. Add `$(SRCROOT)/Carthage/Build/iOS/ShadowView.framework` to `Input Files` of Run Script Phase for Carthage.
77+
78+
#### Manually
79+
80+
1. Download and drop all files in _ShadowView_ directory in your project.
81+
2. Nice Job the best shadow library is now installed! 🎉 🎊 🎈
82+
83+
#### Import
84+
5985
To get the full benefits import `ShadowView` wherever you import UIKit
6086

61-
``` swift
87+
```swift
6288
import UIKit
6389
import ShadowView
6490
```
65-
#### Manually
66-
1. Download and drop all files in *ShadowView* directory in your project.
67-
2. Nice Job the best shadow library is now installed! 🎉 🎊 🎈
6891

6992
## How it works
7093

7194
#### Normal Shadows
72-
73-
This shadow framework uses default CoreGraphics shadows by adding it the the layer of the view.
7495

75-
``` swift
96+
This shadow framework uses default CoreGraphics shadows by adding it the the layer of the view.
97+
98+
```swift
7699
layer.shadowColor : CGColor
77100
layer.shadowRadius : CGFloat
78101
layer.shadowOffset : CGSize
@@ -88,49 +111,51 @@ The container takes a screen of all it's subviews and then apply blur on it.
88111

89112
## Usage example
90113

91-
### With Storyboard
114+
### With Storyboard
115+
116+
#### Normal Shadows
92117

93-
#### Normal Shadows
118+
Any view has new paramerters in the storyboar that you can change in order to add a customize shadow to your view.
94119

95-
Any view has new paramerters in the storyboar that you can change in order to add a customize shadow to your view.
120+
#### Projected Gaussian Shadows
96121

97-
#### Projected Gaussian Shadows
98122
Add an UIView to you ViewController, change it class to ShadowView and insert in it all view that needs a blurred shadow.
99-
![][exampleSTR2-image]
123+
![][examplestr2-image]
100124

101-
### Programmatically
125+
### Programmatically
102126

103-
#### Normal Shadows
127+
#### Normal Shadows
104128

105-
Set the shadows parameters to your view and it the shadow will appear! 🌟
129+
Set the shadows parameters to your view and it the shadow will appear! 🌟
106130

107-
``` swift
131+
```swift
108132
view.shadowRadius = 5
109133
view.shadowOffset = CGSize.zero
110134
view.shadowColor = UIColor.black.cgColor
111-
view.shadowOpacity = 0.3
135+
view.shadowOpacity = 0.3
112136
```
113137

114-
#### Projected Gaussian Shadows
138+
#### Projected Gaussian Shadows
115139

116140
Create you container ShadowView and then add views that need Shadows inside of it.
117-
``` swift
141+
142+
```swift
118143
let exampleShadowContainerView = ShadowView()
119144
let imageView = UIImageView(image: #imageLiteral(resourceName: "sample.jpg"))
120-
145+
121146
override func loadView() {
122147
super.loadView()
123-
148+
124149
exampleShadowContainerView.frame = self.view.bounds
125150
exampleShadowContainerView.autoresizingMask = [.flexibleWidth,.flexibleHeight]
126151
exampleShadowContainerView.shadowOffset = CGSize(width: 0, height: 10)
127152
exampleShadowContainerView.shadowRadius = 20
128-
153+
129154
self.view.addSubview(exampleShadowContainerView)
130155
self.exampleShadowContainerView.addSubview(imageView)
131156
imageView.center = exampleShadowContainerView.center
132157
}
133-
158+
134159
override func viewDidLayoutSubviews() {
135160
super.viewDidLayoutSubviews()
136161
imageView.frame.size = CGSize(width: 200, height: 200)
@@ -139,11 +164,11 @@ Create you container ShadowView and then add views that need Shadows inside of i
139164
}
140165
```
141166

142-
*Please see the example for more prescisions.*
167+
_Please see the example for more prescisions._
143168

144169
## Parameters
145170

146-
``` swift
171+
```swift
147172

148173
//Shared Paramerters
149174

@@ -174,23 +199,23 @@ Create you container ShadowView and then add views that need Shadows inside of i
174199

175200
## Notes
176201

177-
*Don't* use Views like Sliders or ActivityIndicators, the shadow don't update un real-time.
202+
_Don't_ use Views like Sliders or ActivityIndicators, the shadow don't update un real-time.
178203
It's preferable to use statics Views like Labels, images...
179204

180205
## Contribute
181206

182-
We would love you for the contribution to **ShadowView**, check the ``LICENSE`` file for more info.
207+
We would love you for the contribution to **ShadowView**, check the `LICENSE` file for more info.
183208
If you find an issue, [open a ticket](https://github.com/olddonkey/ShadowImageView/issues/new) on it.
184209

185210
## Meta
186211

187212
Pierre Perrin – pierreperrin@outlook.com
188213

189-
Distributed under the MIT license. See ``LICENSE`` for more information.
214+
Distributed under the MIT license. See `LICENSE` for more information.
190215

191216
[https://github.com/PierrePerrin/](https://github.com/dbader/)
192217

193-
[swift-image]:https://img.shields.io/badge/swift-3.0-orange.svg
218+
[swift-image]: https://img.shields.io/badge/swift-3.0-orange.svg
194219
[swift-url]: https://swift.org/
195220
[license-image]: https://img.shields.io/badge/License-MIT-blue.svg
196221
[license-url]: LICENSE
@@ -201,7 +226,4 @@ Distributed under the MIT license. See ``LICENSE`` for more information.
201226
[example-image]: https://github.com/PierrePerrin/ShadowView/raw/master/Ressources/Example.png
202227
[example2-image]: https://github.com/PierrePerrin/ShadowView/raw/master/Ressources/Example2.png
203228
[example2-image]: https://github.com/PierrePerrin/ShadowView/raw/master/Ressources/Example2.png
204-
[exampleSTR2-image]: https://github.com/PierrePerrin/ShadowView/raw/master/Ressources/exampleSTR2.png
205-
206-
207-
229+
[examplestr2-image]: https://github.com/PierrePerrin/ShadowView/raw/master/Ressources/exampleSTR2.png

ShadowView.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'ShadowView'
4-
s.version = '1.3'
4+
s.version = '1.3.1'
55
s.summary = 'ShadowView is an iOS Shadow library that makes view\'s shadow implementation easy and sweet'
66

77
s.description = <<-DESC
@@ -14,6 +14,6 @@ s.license = { :type => 'MIT', :file => 'LICENSE' }
1414
s.author = { 'Pierre Pierrin' => 'pierreperrin@outlook.com' }
1515
s.source = { :git => 'https://github.com/PierrePerrin/ShadowView.git', :tag => s.version.to_s }
1616
s.ios.deployment_target = '8.1'
17-
s.source_files = 'ShadowView/ShadowView/*.swift'
17+
s.source_files = 'ShadowView/*.swift'
1818

1919
end

ShadowView/ShadowView.xcodeproj/project.pbxproj renamed to ShadowView.xcodeproj/project.pbxproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
F926E5191F27F49400EEE74E /* UIImage+Size.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+Size.swift"; sourceTree = "<group>"; };
6464
F926E5241F28F03100EEE74E /* sample.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = sample.jpg; sourceTree = "<group>"; };
6565
F926E5271F290F1600EEE74E /* home2.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = home2.jpeg; sourceTree = "<group>"; };
66-
F926E52A1F29303A00EEE74E /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
6766
F926E52D1F29397000EEE74E /* ExampleProgViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleProgViewController.swift; sourceTree = "<group>"; };
6867
F926E5301F29570900EEE74E /* ShadowView+BlurProcess.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ShadowView+BlurProcess.swift"; sourceTree = "<group>"; };
6968
F926E5331F298C5200EEE74E /* UIImageEffects.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageEffects.swift; sourceTree = "<group>"; };
@@ -98,7 +97,6 @@
9897
F907D0F21F27EC93007D4BE4 = {
9998
isa = PBXGroup;
10099
children = (
101-
F926E52A1F29303A00EEE74E /* README.md */,
102100
F907D0FE1F27EC93007D4BE4 /* ShadowView */,
103101
F907D11B1F27ECA3007D4BE4 /* ShadowViewExample */,
104102
F907D1091F27EC93007D4BE4 /* ShadowViewTests */,
@@ -501,6 +499,7 @@
501499
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
502500
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
503501
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
502+
ONLY_ACTIVE_ARCH = NO;
504503
PRODUCT_BUNDLE_IDENTIFIER = PP.ShadowView;
505504
PRODUCT_NAME = "$(TARGET_NAME)";
506505
SKIP_INSTALL = YES;
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1010"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "F907D0FB1F27EC93007D4BE4"
18+
BuildableName = "ShadowView.framework"
19+
BlueprintName = "ShadowView"
20+
ReferencedContainer = "container:ShadowView.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "F907D1041F27EC93007D4BE4"
36+
BuildableName = "ShadowViewTests.xctest"
37+
BlueprintName = "ShadowViewTests"
38+
ReferencedContainer = "container:ShadowView.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
<MacroExpansion>
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "F907D0FB1F27EC93007D4BE4"
46+
BuildableName = "ShadowView.framework"
47+
BlueprintName = "ShadowView"
48+
ReferencedContainer = "container:ShadowView.xcodeproj">
49+
</BuildableReference>
50+
</MacroExpansion>
51+
<AdditionalOptions>
52+
</AdditionalOptions>
53+
</TestAction>
54+
<LaunchAction
55+
buildConfiguration = "Debug"
56+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
57+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
58+
launchStyle = "0"
59+
useCustomWorkingDirectory = "NO"
60+
ignoresPersistentStateOnLaunch = "NO"
61+
debugDocumentVersioning = "YES"
62+
debugServiceExtension = "internal"
63+
allowLocationSimulation = "YES">
64+
<MacroExpansion>
65+
<BuildableReference
66+
BuildableIdentifier = "primary"
67+
BlueprintIdentifier = "F907D0FB1F27EC93007D4BE4"
68+
BuildableName = "ShadowView.framework"
69+
BlueprintName = "ShadowView"
70+
ReferencedContainer = "container:ShadowView.xcodeproj">
71+
</BuildableReference>
72+
</MacroExpansion>
73+
<AdditionalOptions>
74+
</AdditionalOptions>
75+
</LaunchAction>
76+
<ProfileAction
77+
buildConfiguration = "Release"
78+
shouldUseLaunchSchemeArgsEnv = "YES"
79+
savedToolIdentifier = ""
80+
useCustomWorkingDirectory = "NO"
81+
debugDocumentVersioning = "YES">
82+
<MacroExpansion>
83+
<BuildableReference
84+
BuildableIdentifier = "primary"
85+
BlueprintIdentifier = "F907D0FB1F27EC93007D4BE4"
86+
BuildableName = "ShadowView.framework"
87+
BlueprintName = "ShadowView"
88+
ReferencedContainer = "container:ShadowView.xcodeproj">
89+
</BuildableReference>
90+
</MacroExpansion>
91+
</ProfileAction>
92+
<AnalyzeAction
93+
buildConfiguration = "Debug">
94+
</AnalyzeAction>
95+
<ArchiveAction
96+
buildConfiguration = "Release"
97+
revealArchiveInOrganizer = "YES">
98+
</ArchiveAction>
99+
</Scheme>
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)