Skip to content

Commit 5cfaeb9

Browse files
committedMar 10, 2019
Added .podspec, added readme, changed min dep_target version to 9.0, added gif for readme.
1 parent e2f0c39 commit 5cfaeb9

File tree

5 files changed

+86
-4
lines changed

5 files changed

+86
-4
lines changed
 

‎DDBlackWhite.podspec

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Pod::Spec.new do |spec|
2+
3+
spec.name = "DDBlackWhite"
4+
spec.platform = :ios
5+
spec.summary = "DDBlackWhite allows a user to make his image black and white"
6+
spec.requires_arc = true
7+
spec.version = "0.0.2"
8+
spec.license = { :type => "MIT", :file => "LICENSE" }
9+
spec.author = { "Dmitriy Dotsenko" => "d.dotsenko@icloud.com" }
10+
spec.homepage = "https://github.com/d-dotsenko/DDBlackWhite"
11+
spec.source = { :git => "https://github.com/d-dotsenko/DDBlackWhite.git", :tag => "#{spec.version}" }
12+
spec.frameworks = "UIKit"
13+
spec.source_files = "DDBlackWhite/**/*.{h,swift}"
14+
spec.swift_version = "4.2"
15+
spec.ios.deployment_target = "9.0"
16+
end

‎DDBlackWhite.xcodeproj/project.pbxproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
194194
GCC_WARN_UNUSED_FUNCTION = YES;
195195
GCC_WARN_UNUSED_VARIABLE = YES;
196-
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
196+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
197197
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
198198
MTL_FAST_MATH = YES;
199199
ONLY_ACTIVE_ARCH = YES;
@@ -251,7 +251,7 @@
251251
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
252252
GCC_WARN_UNUSED_FUNCTION = YES;
253253
GCC_WARN_UNUSED_VARIABLE = YES;
254-
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
254+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
255255
MTL_ENABLE_DEBUG_INFO = NO;
256256
MTL_FAST_MATH = YES;
257257
SDKROOT = iphoneos;
@@ -275,6 +275,7 @@
275275
DYLIB_INSTALL_NAME_BASE = "@rpath";
276276
INFOPLIST_FILE = DDBlackWhite/Info.plist;
277277
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
278+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
278279
LD_RUNPATH_SEARCH_PATHS = (
279280
"$(inherited)",
280281
"@executable_path/Frameworks",
@@ -301,6 +302,7 @@
301302
DYLIB_INSTALL_NAME_BASE = "@rpath";
302303
INFOPLIST_FILE = DDBlackWhite/Info.plist;
303304
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
305+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
304306
LD_RUNPATH_SEARCH_PATHS = (
305307
"$(inherited)",
306308
"@executable_path/Frameworks",

‎DDBlackWhiteExample/DDBlackWhiteExample.xcodeproj/project.pbxproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
272272
GCC_WARN_UNUSED_FUNCTION = YES;
273273
GCC_WARN_UNUSED_VARIABLE = YES;
274-
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
274+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
275275
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
276276
MTL_FAST_MATH = YES;
277277
ONLY_ACTIVE_ARCH = YES;
@@ -326,7 +326,7 @@
326326
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
327327
GCC_WARN_UNUSED_FUNCTION = YES;
328328
GCC_WARN_UNUSED_VARIABLE = YES;
329-
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
329+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
330330
MTL_ENABLE_DEBUG_INFO = NO;
331331
MTL_FAST_MATH = YES;
332332
SDKROOT = iphoneos;
@@ -343,6 +343,7 @@
343343
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
344344
CODE_SIGN_STYLE = Automatic;
345345
INFOPLIST_FILE = DDBlackWhiteExample/Info.plist;
346+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
346347
LD_RUNPATH_SEARCH_PATHS = (
347348
"$(inherited)",
348349
"@executable_path/Frameworks",
@@ -361,6 +362,7 @@
361362
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
362363
CODE_SIGN_STYLE = Automatic;
363364
INFOPLIST_FILE = DDBlackWhiteExample/Info.plist;
365+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
364366
LD_RUNPATH_SEARCH_PATHS = (
365367
"$(inherited)",
366368
"@executable_path/Frameworks",

‎Info/DDBlackWhite.gif

3.1 MB
Loading

‎README.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# DDBlackWhite
2+
3+
[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat)](https://developer.apple.com/swift)
4+
[![Platform](https://img.shields.io/cocoapods/p/DDBlackWhite.svg?style=flat)](http://cocoapods.org/pods/DDBlackWhite)
5+
[![License](https://img.shields.io/cocoapods/l/DDBlackWhite.svg?style=flat)](http://cocoapods.org/pods/DDBlackWhite)
6+
[![Version](https://img.shields.io/cocoapods/v/DDBlackWhite.svg?style=flat)](http://cocoapods.org/pods/DDBlackWhite)
7+
8+
9+
Make your image black and white
10+
11+
<img src="Info/DDBlackWhite.gif?raw=true" alt="DDBlackWhite" width=320>
12+
13+
## Installation
14+
15+
### CocoaPods
16+
17+
To install `DDBlackWhite` via [CocoaPods](http://cocoapods.org), add the following line to your Podfile:
18+
19+
```
20+
pod 'DDBlackWhite'
21+
```
22+
23+
### Manually
24+
25+
Add `DDBlackWhite` folder to your Xcode project.
26+
27+
## Usage
28+
29+
See the example Xcode project.
30+
31+
### Basic setup
32+
33+
Create the `DDBlackWhite` instance, set the `inputImage` and `brightness` variables.
34+
Call `getFilteredImage` method and its closure will return the filtered image.
35+
36+
```swift
37+
let blackWhite = DDBlackWhite()
38+
blackWhite.inputImage = image
39+
blackWhite.brightness = 0.8
40+
blackWhite.getFilteredImage { (image) in
41+
// filtered image received
42+
}
43+
```
44+
45+
### Populating the data
46+
47+
```swift
48+
var inputImage: UIImage?
49+
private(set) var outputImage: UIImage?
50+
var brightness: CGFloat // The filter brightness value (0.0 ... 1.0), Default is 0.5
51+
52+
func getFilteredImage(closure: @escaping (UIImage?)->Void)
53+
```
54+
55+
## Requirements
56+
57+
- iOS 9.0
58+
- Xcode 10, Swift 4.2
59+
60+
## License
61+
62+
`DDBlackWhite` is available under the MIT license. See the LICENSE file for more info.

0 commit comments

Comments
 (0)
Please sign in to comment.