• Stars
    star
    210
  • Rank 187,585 (Top 4 %)
  • Language
    Objective-C
  • Created over 10 years ago
  • Updated almost 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Applying filter by your fingers

FeSlideFilter

Filter with own way !

IMAGE ALT TEXT HERE

Youtube : https://www.youtube.com/watch?v=KUN6bs9pl74&feature=youtu.be

In Brief

FeSlideFilterView is subclass UIView. Bring new way to display your photo.

You can slide between filter by your touch. Gain more User Exp than nomal way.

Requirement

So You must ensure your project has iOS version more than iOS 7.0.

And compatible with ARC or non-ARC.

Sample code

In Sample code, I user LUT technique to apply filter to photo.

More info, visist my blog : http://nghiatran.me/index.php/filter-me-color-lookup-table-part-2/

If you wanna use LUT, please sure you added Core Image and OpenGL ES framwork to your project.

How to use

FeSlideFilter use Data Source / Delgate pattern like UITableView.

Just provide filtered UIImage

and Title for each Filter.

Ex :

// Number of filter
-(NSInteger) numberOfFilter
{
    return 5;
}

// Title for filter at index
-(NSString *) FeSlideFilterView:(FeSlideFilterView *)sender titleFilterAtIndex:(NSInteger)index
{
    return _arrTittleFilter[index];
}

// Filtered UIImage at index
-(UIImage *) FeSlideFilterView:(FeSlideFilterView *)sender imageFilterAtIndex:(NSInteger)index
{
    return _arrPhoto[index];
}

If you want to customize by yourself. Just assign your button with _doneBtn property.

// Btn
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(0, 0, 40, 40);
    [btn setBackgroundImage:[UIImage imageNamed:@"done"] forState:UIControlStateNormal];
    
    _slideFilterView.doneBtn = btn;
    

======================

Data Source - Delegate

You can change behavior by changing 3 properties when init

Data Source :

@required
// Number of filter
-(NSInteger) numberOfFilter;

// Title filter at index
-(NSString *) FeSlideFilterView:(FeSlideFilterView *) sender titleFilterAtIndex:(NSInteger) index;

// Image at index
-(UIImage *) FeSlideFilterView:(FeSlideFilterView *) sender imageFilterAtIndex:(NSInteger) index;

@optional
// Font at index
-(UIFont *) FeSlideFilterView:(FeSlideFilterView *) sender fontForTitleAtIndex:(NSInteger) index;

// Layer's content Gravity
-(NSString *) kCAContentGravityForLayer;

Delegate :

// Call when user tapped Btn
-(void) FeSlideFilterView:(FeSlideFilterView *) sender didTapDoneButtonAtIndex:(NSInteger) index;

// Determine when user can slide
-(BOOL) FeSlideFilterView:(FeSlideFilterView *)sender shouldSlideFilterAtIndex:(NSInteger) index;

// Call when user have just slided
-(void) FeSlideFilterView:(FeSlideFilterView *)sender didBeginSlideFilterAtIndex:(NSInteger) index;

// Call when user end Slide
-(void) FeSlideFilterView:(FeSlideFilterView *)sender didEndSlideFilterAtIndex:(NSInteger) index;

MIT License

Copyright (c) 2014 Nghia Tran

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release notes

Version 1.1

Allow set layer's content gravity for FeSlideFilter

Version 1.0

Initial release

More Repositories

1

FeSpinner

Rocket Loader Collection for iOS app
Objective-C
1,481
star
2

iOS-Awesome-Starter-Kit

The perfect combination: Clean Swift + ReSwift + PromiseKit
Swift
602
star
3

artify-macos

🌎 18th century Arts for everyone
Swift
164
star
4

Responsive-Interaction-Control

Bring whole-new Android L's animation to iOS
Objective-C
164
star
5

data-visualization-deck-gl

A experiment to visualize Tree in NewYork and Flight record data. Using Deck.gl and Kaggle
JavaScript
57
star
6

Titan

Postgresql client for macOS/iOS. Clean design. Absolutely 100% Free and open-source.
Swift
39
star
7

Unofficial-Uber-macOS

Unofficial Uber πŸš— for macOS.
Objective-C
32
star
8

FeProfileCardView

Customize Profile screen. Inspired by https://dribbble.com/shots/1659780-Profile-Interaction?list=users&offset=9
Objective-C
19
star
9

artify-core

The sweet heart of Artify πŸ‘‘
Go
18
star
10

DropFilter

Source code for DropFilter
Objective-C
12
star
11

Toggl-Swift

Toggl API Wrapper πŸ“¦ for macOS
Swift
11
star
12

plan-for-dummy-dev

A plan for dummy developer who would like to take a serious aboard job ✈️
Swift
5
star
13

hackUIButton

Objective-C
5
star
14

LCS-Swift

Demonstration for Longest Common Subsequence (LCS) in swift. Ref http://nghiatran.me/longest-common-subsequence-diff-part-1/
Swift
5
star
15

Music-Sheets-Collection

Piano sheet music.
4
star
16

FeSpringFlowLayout

Make collection cell fell naturally.
Objective-C
4
star
17

WebsocketWithProxyman

URLSessionWebsocketTask with Proxyman app
Swift
3
star
18

titan-refactor

A elegant version for titan app
Swift
3
star
19

SleepWakeNotification

SleepWakeNotification
Objective-C
2
star
20

FeGenerateShopDatabase

A small app for creating dump database
Objective-C
2
star
21

til

TIL
2
star
22

vehicle-check-mvvm

Swift
2
star
23

eSales

Bring git local to git remote.
Objective-C
2
star
24

Swifty-PostgreSQL

Swifty-PostgreSQL driver, written by Swift 3.0
Swift
2
star
25

Fabulous_TwitSplit

A Fabulous TwitSplit assignment.
Swift
2
star
26

nghiatranuit.github.io

Simple blog for https://nghiatranuit.github.io
SCSS
2
star
27

google-api-objectivec-client

Automatically exported from code.google.com/p/google-api-objectivec-client
Objective-C
1
star
28

websocket-usercases

JavaScript
1
star
29

s3713031_lab3

s3713031_lab3
Java
1
star
30

s3713031_lab1

s3713031_lab1
Java
1
star
31

HelloGradle

HTML
1
star
32

FeThirdLayerMenu

Inspired by ...
Objective-C
1
star
33

FilterMe-Texture

https://nghiatran.me/filter-me-texture-blend-mode-part-3/
Objective-C
1
star
34

syntax-highlighter

Swift
1
star
35

FeCondomMenu

Objective-C
1
star
36

interview-dawson

Swift
1
star
37

AwesomeBox

C++
1
star
38

TickTak

Hackathon
1
star
39

GoldenRetrieverProject

Objective-C
1
star
40

FilterMe_Part_2

https://nghiatran.me/filter-me-color-lookup-table-part-2/
Objective-C
1
star
41

Jupiter

Swift
1
star
42

FeRainbowMenu

Rainbow menu, inspired by ....
Objective-C
1
star
43

Swiftify-Toggl

Swift wrapper for Toggl API v8
Swift
1
star
44

SampleApp

This is a sample app
1
star
45

NavigationDrawer_Test_Andoird

Testing purpose
1
star
46

introduction-to-algo

My study progress
Swift
1
star
47

simple-server-testing

JavaScript
1
star
48

watch-os-example

Intercept HTTP/HTTS Request/Response on Watch OS by Proxyman
Swift
1
star
49

proxyman-raycast

TypeScript
1
star
50

intro-it-assignment-2

JavaScript
1
star