├── icon.png
├── icon_iPad.png
├── Assets
└── sample.gif
├── Default-568h@2x.png
├── .gitignore
├── SEFilterControl_Sample.xcodeproj
├── xcuserdata
│ ├── shadyelyaski.xcuserdatad
│ │ ├── xcdebugger
│ │ │ └── Breakpoints.xcbkptlist
│ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── SEFilterControl_Sample.xcscheme
│ └── gougou.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── SEFilterControl_Sample.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── gougou.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── SEFilterControl_Sample.xccheckout
└── project.pbxproj
├── SEFilterControl_Sample
├── Sample1ViewController.h
├── Sample2ViewController.h
├── Sample3ViewController.h
├── Sample4ViewController.h
├── ViewController.h
├── AppDelegate.h
├── main.m
├── SEFilterControl_Sample-Prefix.pch
├── AppDelegate.m
├── Sample2ViewController.m
├── Samples.plist
├── Sample1ViewController.xib
├── Sample4ViewController.m
├── SEFilterControl_Sample-Info.plist
├── Sample3ViewController.m
├── ViewController.m
├── ViewController.xib
├── Sample1ViewController.m
├── Sample4ViewController.xib
├── Sample2ViewController.xib
└── Sample3ViewController.xib
├── SEFilterControl.podspec
├── LICENSE
├── SEFilterKnob.h
├── SEFilterControl.h
├── README.md
├── SEFilterKnob.m
└── SEFilterControl.m
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShadyElyaski/ios-filter-control/HEAD/icon.png
--------------------------------------------------------------------------------
/icon_iPad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShadyElyaski/ios-filter-control/HEAD/icon_iPad.png
--------------------------------------------------------------------------------
/Assets/sample.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShadyElyaski/ios-filter-control/HEAD/Assets/sample.gif
--------------------------------------------------------------------------------
/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShadyElyaski/ios-filter-control/HEAD/Default-568h@2x.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | SEFilterControl_Sample.xcodeproj/project.xcworkspace/xcuserdata/shadyelyaski.xcuserdatad/UserInterfaceState.xcuserstate
3 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample.xcodeproj/xcuserdata/shadyelyaski.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample.xcodeproj/project.xcworkspace/xcuserdata/gougou.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ShadyElyaski/ios-filter-control/HEAD/SEFilterControl_Sample.xcodeproj/project.xcworkspace/xcuserdata/gougou.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample1ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // Sample1ViewController.h
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Nicolas Goutaland on 02/05/15.
6 | // Copyright (c) 2015 Shady Elyaski. All rights reserved.
7 | //
8 |
9 | @interface Sample1ViewController : UIViewController
10 |
11 | @end
12 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample2ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // Sample2ViewController.h
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Nicolas Goutaland on 02/05/15.
6 | // Copyright (c) 2015 Shady Elyaski. All rights reserved.
7 | //
8 |
9 | @interface Sample2ViewController : UIViewController
10 |
11 | @end
12 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample3ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // Sample3ViewController.h
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Nicolas Goutaland on 02/05/15.
6 | // Copyright (c) 2015 Shady Elyaski. All rights reserved.
7 | //
8 |
9 | @interface Sample3ViewController : UIViewController
10 |
11 | @end
12 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample4ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // Sample4ViewController.h
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Nicolas Goutaland on 02/05/15.
6 | // Copyright (c) 2015 Shady Elyaski. All rights reserved.
7 | //
8 |
9 | @interface Sample4ViewController : UIViewController
10 |
11 | @end
12 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Shady A. Elyaski on 6/15/12.
6 | // Copyright (c) 2012 Shady Elyaski. All rights reserved.
7 | //
8 |
9 | @interface ViewController : UIViewController
10 | @end
11 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Shady A. Elyaski on 6/15/12.
6 | // Copyright (c) 2012 Shady Elyaski. All rights reserved.
7 | //
8 |
9 | @class ViewController;
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (nonatomic, strong) UIWindow *window;
14 | @end
--------------------------------------------------------------------------------
/SEFilterControl_Sample/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Shady A. Elyaski on 6/15/12.
6 | // Copyright (c) 2012 Shady Elyaski. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char *argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/SEFilterControl_Sample-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'SEFilterControl_Sample' target in the 'SEFilterControl_Sample' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_4_0
8 | #warning "This project uses features only available in iOS SDK 4.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #import "SEFilterControl.h"
15 | #endif
16 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample.xcodeproj/xcuserdata/gougou.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/SEFilterControl.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'SEFilterControl'
3 | s.version = '2.0.0'
4 | s.license = 'MIT'
5 | s.platform = :ios, "5.0"
6 | s.authors = { 'Shady Elyaski' => 'shady@elyaski.com', 'Nicolas Goutaland' => 'nicolas.goutaland@gmail.com' }
7 | s.homepage = 'https://github.com/ShadyElyaski/ios-filter-control'
8 | s.summary = 'An iOS Filter UIControl Subclass. Zero Graphics. Highly Customizable.'
9 | s.source = { :git => 'https://github.com/ShadyElyaski/ios-filter-control.git', :tag => "#{s.version}"}
10 | s.source_files = '*.{h,m}'
11 | s.requires_arc = true
12 | end
13 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample.xcodeproj/xcuserdata/gougou.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SEFilterControl_Sample.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 96EB2931158B9A4600053974
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample.xcodeproj/xcuserdata/shadyelyaski.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SEFilterControl_Sample.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 96EB2931158B9A4600053974
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Shady A. Elyaski on 6/15/12.
6 | // Copyright (c) 2012 Shady Elyaski. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "ViewController.h"
11 |
12 | @implementation AppDelegate
13 | #pragma mark - Aplication lifecycle
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
17 | self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] init]];
18 | [self.window makeKeyAndVisible];
19 |
20 | return YES;
21 | }
22 | @end
23 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample2ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // Sample2ViewController.m
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Nicolas Goutaland on 02/05/15.
6 | // Copyright (c) 2015 Shady Elyaski. All rights reserved.
7 | //
8 | // This sample demonstrates how to create filters using a xib
9 |
10 | #import "Sample2ViewController.h"
11 |
12 | @interface Sample2ViewController ()
13 |
14 | @end
15 |
16 | @implementation Sample2ViewController
17 | #pragma mark - Constructor
18 | - (id)init
19 | {
20 | if (self = [super initWithNibName:@"Sample2ViewController" bundle:nil])
21 | {
22 |
23 | }
24 |
25 | return self;
26 | }
27 |
28 | #pragma mark - View management
29 | - (void)viewDidLoad
30 | {
31 | [super viewDidLoad];
32 | }
33 |
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Samples.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | title
7 | Creation by code
8 | viewController
9 | Sample1ViewController
10 |
11 |
12 | title
13 | Creation via Interface Builder
14 | viewController
15 | Sample2ViewController
16 |
17 |
18 | title
19 | UI Events
20 | viewController
21 | Sample3ViewController
22 |
23 |
24 | title
25 | Data update
26 | viewController
27 | Sample4ViewController
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Shady Elyaski
2 |
3 | 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:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | 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.
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample1ViewController.xib:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample4ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // Sample4ViewController.m
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Nicolas Goutaland on 02/05/15.
6 | // Copyright (c) 2015 Shady Elyaski. All rights reserved.
7 | //
8 | // This sample demonstrates how to update labels at runtime
9 |
10 | #import "Sample4ViewController.h"
11 |
12 | #define DATA_ARRAY @[@"Articles", @"News", @"Updates", @"Featured", @"Newest", @"Oldest"]
13 |
14 | @interface Sample4ViewController ()
15 | // Outlets
16 | @property (nonatomic, weak) IBOutlet UILabel *filterLabel;
17 | @property (nonatomic, weak) IBOutlet SEFilterControl *filterControl;
18 | @end
19 |
20 | @implementation Sample4ViewController
21 | #pragma mark - Constructor
22 | - (id)init
23 | {
24 | if (self = [super initWithNibName:@"Sample4ViewController" bundle:nil])
25 | {
26 |
27 | }
28 |
29 | return self;
30 | }
31 |
32 | #pragma mark - View management
33 | - (void)viewDidLoad
34 | {
35 | [super viewDidLoad];
36 |
37 | // Set initial data
38 | [_filterControl setTitles:DATA_ARRAY];
39 | }
40 |
41 | #pragma mark - UI Actions
42 | - (IBAction)filterValueChanged:(SEFilterControl *)sender
43 | {
44 | [_filterLabel setText:[NSString stringWithFormat:@"Selected index : %ld", sender.selectedIndex]];
45 | }
46 |
47 | - (IBAction)refreshData
48 | {
49 | NSMutableArray *titles = [DATA_ARRAY mutableCopy];
50 |
51 | // Generate a new array
52 | NSInteger count = arc4random_uniform((int)titles.count - 2);
53 | for (NSInteger i=0; i
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 88F798B1-2618-483D-BB6C-6E455F5F1B07
9 | IDESourceControlProjectName
10 | SEFilterControl_Sample
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 2114C6B37FDADEF947B1153B728E49375B2F4D7E
14 | https://github.com/nicolasgoutaland/ios-filter-control.git
15 |
16 | IDESourceControlProjectPath
17 | SEFilterControl_Sample.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 2114C6B37FDADEF947B1153B728E49375B2F4D7E
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/nicolasgoutaland/ios-filter-control.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | 2114C6B37FDADEF947B1153B728E49375B2F4D7E
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 2114C6B37FDADEF947B1153B728E49375B2F4D7E
36 | IDESourceControlWCCName
37 | ios-filter-control
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/SEFilterControl_Sample-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | FilterControl
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIcons
12 |
13 | CFBundlePrimaryIcon
14 |
15 | CFBundleIconFiles
16 |
17 | knob@2x.png
18 | icon.png
19 | icon_iPad.png
20 |
21 | UIPrerenderedIcon
22 |
23 |
24 |
25 | CFBundleIdentifier
26 | se.${PRODUCT_NAME:rfc1034identifier}
27 | CFBundleInfoDictionaryVersion
28 | 6.0
29 | CFBundleName
30 | ${PRODUCT_NAME}
31 | CFBundlePackageType
32 | APPL
33 | CFBundleShortVersionString
34 | 1.0
35 | CFBundleSignature
36 | ????
37 | CFBundleVersion
38 | 1.0
39 | LSRequiresIPhoneOS
40 |
41 | UIPrerenderedIcon
42 |
43 | UIRequiredDeviceCapabilities
44 |
45 | armv7
46 |
47 | UIStatusBarStyle
48 | UIStatusBarStyleBlackOpaque
49 | UISupportedInterfaceOrientations
50 |
51 | UIInterfaceOrientationPortrait
52 |
53 | UISupportedInterfaceOrientations~ipad
54 |
55 | UIInterfaceOrientationPortrait
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/SEFilterKnob.h:
--------------------------------------------------------------------------------
1 | //
2 | // SYFilterKnob.h
3 | // SEFilterControl_Test
4 | //
5 | // Created by Shady A. Elyaski on 6/15/12.
6 | // Copyright (c) 2012 mash, ltd. All rights reserved.
7 | //
8 | // 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:
9 | //
10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11 | //
12 | // 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.
13 |
14 | #define SEFilterKnob_DEFAULT_SHADOW YES
15 | #define SEFilterKnob_DEFAULT_SHADOW_COLOR [UIColor colorWithRed:0 green:0 blue:0 alpha:.4f]
16 | #define SEFilterKnob_DEFAULT_HANDLER_COLOR [UIColor colorWithRed:230/255.f green:230/255.f blue:230/255.f alpha:1]
17 |
18 | @interface SEFilterKnob : UIButton
19 |
20 | @property (nonatomic, strong) UIColor *handlerColor UI_APPEARANCE_SELECTOR; // Configure handler color
21 | @property (nonatomic, strong) UIColor *shadowColor UI_APPEARANCE_SELECTOR; // Configure shadow color
22 | @property (nonatomic, assign) BOOL shadow UI_APPEARANCE_SELECTOR; // Enable / disable shadow. Default is YES
23 | @end
24 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample3ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // Sample3ViewController.m
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Nicolas Goutaland on 02/05/15.
6 | // Copyright (c) 2015 Shady Elyaski. All rights reserved.
7 | //
8 | // This sample demonstrates how to get notified by value change and the use of continuous property
9 |
10 | #import "Sample3ViewController.h"
11 |
12 | @interface Sample3ViewController ()
13 | // Outlets
14 | @property (nonatomic, weak) IBOutlet SEFilterControl *firstFilterControl;
15 | @property (nonatomic, weak) IBOutlet SEFilterControl *secondFilterControl;
16 | @property (nonatomic, weak) IBOutlet SEFilterControl *thirdFilterControl;
17 |
18 | @property (nonatomic, weak) IBOutlet UILabel *firstFilterLabel;
19 | @property (nonatomic, weak) IBOutlet UILabel *secondFilterLabel;
20 | @property (nonatomic, weak) IBOutlet UILabel *thirdFilterLabel;
21 | @end
22 |
23 | @implementation Sample3ViewController
24 | #pragma mark - Constructor
25 | - (id)init
26 | {
27 | if (self = [super initWithNibName:@"Sample3ViewController" bundle:nil])
28 | {
29 |
30 | }
31 |
32 | return self;
33 | }
34 |
35 | #pragma mark - View management
36 | - (void)viewDidLoad
37 | {
38 | [super viewDidLoad];
39 |
40 | // Create a filter by code
41 | SEFilterControl *filter = [[SEFilterControl alloc]initWithFrame:CGRectMake(10, 80, 300, 70) titles:[NSArray arrayWithObjects:@"Articles", @"News", @"Updates", @"Featured", @"Newest", @"Oldest", nil]];
42 | [filter addTarget:self action:@selector(firstFilterValueChanged:) forControlEvents:UIControlEventValueChanged];
43 | [self.view addSubview:filter];
44 |
45 | // Hold filter
46 | _firstFilterControl = filter;
47 | }
48 |
49 | #pragma mark - Slider events
50 | - (IBAction)firstFilterValueChanged:(SEFilterControl *) sender
51 | {
52 | [_firstFilterLabel setText:[NSString stringWithFormat:@"Selected index : %ld", sender.selectedIndex]];
53 | }
54 |
55 | - (IBAction)secondFilterValueChanged:(SEFilterControl *) sender
56 | {
57 | [_secondFilterLabel setText:[NSString stringWithFormat:@"Selected index : %ld", sender.selectedIndex]];
58 | }
59 |
60 | - (IBAction)thirdFilterValueChanged:(SEFilterControl *) sender
61 | {
62 | [_thirdFilterLabel setText:[NSString stringWithFormat:@"Selected index continuous : %ld", sender.selectedIndex]];
63 | }
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Shady A. Elyaski on 6/15/12.
6 | // Copyright (c) 2012 Shady Elyaski. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | #define CELL_ID @"ViewControllerCellID"
12 | #define TITLE_KEY @"title"
13 | #define VIEW_CONTROLLER_KEY @"viewController"
14 |
15 | @interface ViewController ()
16 | // Data
17 | @property (nonatomic, strong) NSArray *samplesData;
18 | @end
19 |
20 | @implementation ViewController
21 | #pragma mark - Constructor
22 | - (id)init
23 | {
24 | if (self = [super initWithNibName:@"ViewController" bundle:nil])
25 | {
26 | // Load sample data
27 | _samplesData = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Samples" ofType:@"plist"]];
28 | self.title = @"Samples";
29 | }
30 |
31 | return self;
32 | }
33 |
34 | #pragma mark - UITableViewDelegate methods
35 | - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
36 | {
37 | // Update cell title
38 | cell.textLabel.text = [[_samplesData objectAtIndex:indexPath.row] objectForKey:TITLE_KEY];
39 | }
40 |
41 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
42 | {
43 | [self.navigationController pushViewController:[self viewControllerForIndexPath:indexPath]
44 | animated:YES];
45 |
46 | [tableView deselectRowAtIndexPath:indexPath
47 | animated:YES];
48 | }
49 |
50 | #pragma mark - UITableViewDatasource methods
51 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
52 | {
53 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CELL_ID];
54 | if (!cell)
55 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CELL_ID];
56 |
57 | return cell;
58 | }
59 |
60 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
61 | {
62 | return _samplesData.count;
63 | }
64 |
65 | #pragma mark - Utils
66 | - (UIViewController *)viewControllerForIndexPath:(NSIndexPath *)indexPath
67 | {
68 | // Extract data
69 | NSDictionary *data = [_samplesData objectAtIndex:indexPath.row];
70 | NSString *viewControllerClassName = [data objectForKey:VIEW_CONTROLLER_KEY];
71 |
72 | // Create VC
73 | UIViewController *vc = [[NSClassFromString(viewControllerClassName) alloc] init];
74 | vc.title = [data objectForKey:TITLE_KEY];
75 |
76 | return vc;
77 | }
78 | @end
79 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/ViewController.xib:
--------------------------------------------------------------------------------
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 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample1ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // Sample1ViewController.m
3 | // SEFilterControl_Sample
4 | //
5 | // Created by Nicolas Goutaland on 02/05/15.
6 | // Copyright (c) 2015 Shady Elyaski. All rights reserved.
7 | //
8 | // This sample demonstrates how to create filters by code
9 |
10 | #import "Sample1ViewController.h"
11 |
12 | @interface Sample1ViewController ()
13 | // Outlets
14 | @property (nonatomic, weak) IBOutlet UILabel *captionLabel;
15 | @end
16 |
17 | @implementation Sample1ViewController
18 | #pragma mark - Constructor
19 | - (id)init
20 | {
21 | if (self = [super initWithNibName:@"Sample1ViewController" bundle:nil])
22 | {
23 |
24 | }
25 |
26 | return self;
27 | }
28 |
29 | #pragma mark - View management
30 | - (void)viewDidLoad
31 | {
32 | [super viewDidLoad];
33 |
34 | // Simple filter
35 | SEFilterControl *filter = [[SEFilterControl alloc]initWithFrame:CGRectMake(10, 80, 300, 70) titles:[NSArray arrayWithObjects:@"Articles", @"News", @"Updates", @"Featured", @"Newest", @"Oldest", nil]];
36 | [self.view addSubview:filter];
37 |
38 | // Simple filter, updating knob color, titles color, titles font
39 | filter = [[SEFilterControl alloc]initWithFrame:CGRectMake(30, CGRectGetMaxY(filter.frame) + 20, 260, 60) titles:[NSArray arrayWithObjects:@"Articles", @"Latest", @"Featured", @"Oldest", nil]];
40 | [filter setProgressColor:[UIColor lightGrayColor]];
41 | filter.handler.handlerColor = [UIColor darkGrayColor];
42 | [filter setTitlesColor:[UIColor blackColor]];
43 | [filter setTitlesFont:[UIFont fontWithName:@"Didot" size:14]];
44 | [self.view addSubview:filter];
45 |
46 | filter = [[SEFilterControl alloc]initWithFrame:CGRectMake(60, CGRectGetMaxY(filter.frame) + 20, 200, 80) titles:[NSArray arrayWithObjects:@"Articles", @"Latest", @"Featured", @"Oldest", nil]];
47 | [filter setProgressColor:[UIColor magentaColor]];
48 | filter.handler.handlerColor = [UIColor yellowColor];
49 | [filter setTitlesColor:[UIColor purpleColor]];
50 | [self.view addSubview:filter];
51 |
52 | // Filter with custom labels
53 | UILabel * labelRed = [[UILabel alloc] init];
54 | [labelRed setText:[NSString stringWithFormat:@"Red label"]];
55 | [labelRed setTextColor:[UIColor redColor]];
56 |
57 | UILabel * labelGreen = [[UILabel alloc] init];
58 | [labelGreen setText:[NSString stringWithFormat:@"Green label"]];
59 | [labelGreen setTextColor:[UIColor greenColor]];
60 |
61 | filter = [[SEFilterControl alloc]initWithFrame:CGRectMake(60, CGRectGetMaxY(filter.frame) + 20, 200, 80) titles:[NSArray arrayWithObjects:@"Articles", @"Latest", nil] labels:
62 | [NSArray arrayWithObjects:labelRed, labelGreen, nil]];
63 | [filter setProgressColor:[UIColor magentaColor]];
64 | filter.handler.handlerColor = [UIColor yellowColor];
65 | [self.view addSubview:filter];
66 |
67 | // Filter without labels
68 | filter = [[SEFilterControl alloc]initWithFrame:CGRectMake(60, CGRectGetMaxY(filter.frame) + 20, 200, 80) titles:[NSArray arrayWithObjects:@"", @"", @"", @"", nil]];
69 | [filter setProgressColor:[UIColor purpleColor]];
70 | filter.handler.handlerColor = [UIColor yellowColor];
71 | [self.view addSubview:filter];
72 | }
73 |
74 | @end
75 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample.xcodeproj/xcuserdata/shadyelyaski.xcuserdatad/xcschemes/SEFilterControl_Sample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample.xcodeproj/xcuserdata/gougou.xcuserdatad/xcschemes/SEFilterControl_Sample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/SEFilterControl.h:
--------------------------------------------------------------------------------
1 | //
2 | // SEFilterControl.h
3 | // SEFilterControl_Test
4 | //
5 | // Created by Shady A. Elyaski on 6/13/12.
6 | // Copyright (c) 2012 mash, ltd. All rights reserved.
7 | //
8 | // 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:
9 | //
10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11 | //
12 | // 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.
13 |
14 | #import "SEFilterKnob.h"
15 |
16 | #define SEFilterControl_HEIGHT 70
17 |
18 | #define SEFilterControl_DEFAULT_TITLE_FONT [UIFont fontWithName:@"Optima" size:14]
19 | #define SEFilterControl_DEFAULT_TITLE_SHADOW_COLOR [UIColor lightGrayColor]
20 | #define SEFilterControl_DEFAULT_TITLE_COLOR [UIColor blackColor]
21 | #define SEFilterControl_DEFAULT_PROGRESS_COLOR [UIColor colorWithRed:103/255.f green:173/255.f blue:202/255.f alpha:1]
22 |
23 | IB_DESIGNABLE
24 | @interface SEFilterControl : UIControl
25 |
26 | /* Default constructor */
27 | - (id) initWithFrame:(CGRect)frame titles:(NSArray *)titles;
28 |
29 | /* Constructor with preconfigured labels */
30 | - (id) initWithFrame:(CGRect)frame titles:(NSArray *)titles labels:(NSArray *)labels;
31 |
32 | /* Update titles data */
33 | - (void) setTitles:(NSArray *)titles;
34 |
35 | /* Update titles data, providing labels to use */
36 | - (void) setTitles:(NSArray *)titles labels:(NSArray *)labels;
37 |
38 | /* Set selected index, animated or not */
39 | - (void) setSelectedIndex:(NSUInteger)index animated:(BOOL) animated;
40 |
41 | @property (nonatomic, strong) UIFont *titlesFont UI_APPEARANCE_SELECTOR; // Update all titles font
42 | @property (nonatomic, strong) UIColor *titlesColor UI_APPEARANCE_SELECTOR; // Update all titles color
43 | @property (nonatomic, strong) UIColor *titlesShadowColor UI_APPEARANCE_SELECTOR; // Update all titles shadow color
44 | @property (nonatomic, strong, readonly) NSArray *labels; // All titltes array, for a per title customization
45 | @property (nonatomic, readonly) NSUInteger selectedIndex; // Not animated by default
46 | @property (nonatomic, weak, readonly) SEFilterKnob *handler; // Knob
47 | @property (nonatomic, assign) IBInspectable BOOL continuous; // If YES, slider will send updates its times selected index is updated, without waiting for a touch Up. Default is NO
48 | @property (nonatomic, retain) IBInspectable UIColor *progressColor UI_APPEARANCE_SELECTOR; // Progress color
49 |
50 | // Old methods
51 | /*! @abstract Use initWithFrame:titles: instead */
52 | - (id) initWithFrame:(CGRect)frame Titles:(NSArray *) titles NS_UNAVAILABLE;
53 |
54 | /*! @abstract Use initWithFrame:titles:labels: instead */
55 | - (id) initWithFrame:(CGRect)frame Titles:(NSArray *) titles Labels:(NSArray *) labels NS_UNAVAILABLE;
56 |
57 | /*! @abstract Use selectedIndex */
58 | @property (nonatomic, readonly) NSInteger SelectedIndex NS_UNAVAILABLE;
59 | @end
60 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | iOS Filter Control
2 | ==================
3 |
4 | An iOS Filter UIControl Subclass. Zero Graphics. Highly Customizable.
5 |
6 | Inspired by National Geographics: Park Guides.
7 |
8 | # Screenshot
9 |
10 | Here's a screenshot for different variations
11 |
12 | 
13 |
14 | 
15 |
16 | You may watch a demo video on [Youtube](http://www.youtube.com/watch?v=-lvvLnKPUk8)
17 |
18 | # Installation
19 |
20 | __Cocoapods:__ pod 'SEFilterControl'
21 |
22 | __Manual__:
23 |
24 | 1. In your Xcode Project, take the *SEFilterControl.h and .m* & *SEFilterKnob.h and .m* from ios-filter-control folder and drag them into your project.
25 |
26 | 2. Start using this new UIControl Subclass!
27 |
28 | # SDK Support
29 |
30 | It supports iOS 5 to iOS 8
31 | Live rendering in Interface builder will require Xcode 6.x
32 |
33 | # Usage
34 |
35 | ## Creating your filter
36 | ### By Code
37 | Somewhere, for example in your viewDidLoad, alloc and init the filter UIControl:
38 |
39 | ```
40 | SEFilterControl *filter = [[SEFilterControl alloc]initWithFrame:CGRectMake(10, 20, 300, 70) Titles:[NSArray arrayWithObjects:@"Articles", @"News", @"Updates", @"Featured", @"Newest", @"Oldest", nil]];
41 | ```
42 |
43 | This initializes our Filter Control using CGRect and Titles Array of NSStrings.
44 |
45 | *Note That height of the control is predefined as 70 and can't be changed* Use __SEFilterControl_HEIGHT__ const for reference.
46 |
47 | Then, add target for Value Change Event handling:
48 | ```
49 | [filter addTarget:self action:@selector(filterValueChanged:) forControlEvents:UIControlEventValueChanged];
50 | ```
51 | Don't forget to implement the handler we specified later:
52 |
53 | ```
54 | -(void)filterValueChanged:(SEFilterControl *) sender{
55 | NSLog(@"%@", [NSString stringWithFormat:@"%d", sender.SelectedIndex]);
56 | }
57 | ```
58 |
59 | Adding to your UIView:
60 |
61 | ```
62 | [self.view addSubview:filter];
63 | ```
64 |
65 | ### Via Interface builder
66 | Add a new UIView to your xib, and update its class to __SEFilterControl__.
67 | Bind a UIAction to the __valueChanged__ event of your control.
68 | Enjoy ;)
69 |
70 | ## Configuration
71 | ### Filter
72 | | Property | Effect | Default value |
73 | |:-------------:|-------------|-----|-----|
74 | | **progressColor** | Progress track color | SEFilterControl_DEFAULT_PROGRESS_COLOR |
75 | | **titlesFont** | Configure all titles font | SEFilterControl_DEFAULT_TITLE_FONT |
76 | | **titlesColor** | Configure all titles color | SEFilterControl_DEFAULT_TITLE_COLOR |
77 | | **titlesShadowColor** | Configure all titles shadow color | SEFilterControl_DEFAULT_TITLE_SHADOW_COLOR |
78 |
79 | ### Knob
80 | | Property | Effect | Default value |
81 | |:-------------:|-------------| -----|---|
82 | | **handlerColor** | Configure knob color | SEFilterKnob_DEFAULT_HANDLER_COLOR |
83 | | **shadowColor** | Configure knob shadow color | SEFilterKnob_DEFAULT_SHADOW_COLOR |
84 | | **shadow** | Enable / sisable shadow | SEFilterKnob_DEFAULT_SHADOW |
85 |
86 | ### Continuous mode
87 | If __continuous__ is set to YES, filter will generate __valueChanged__ events will user is dragging the knb. If NO, an event will be sent once knob released.
88 |
89 |
90 | ### UIAppearance
91 | __SEFilterControl__ and __SEFilterKnob__ declare __UIAppearance__ methods, allowing you to style all instances at a time.
92 |
93 | # Acknowledgment
94 |
95 | Special thanks to mash, Ltd. team for their support.
96 |
97 | Thanks to Nicolas Goutaland for the updated version.
98 |
99 | License
100 | -------
101 |
102 | This Code is released under the MIT License by [Shady Elyaski](http://www.elyaski.com)
103 |
104 | Would love to hear from you when you use this custom UIControl in your project!
105 |
106 | Cheers,
107 |
108 | Shady A. Elyaski
109 |
110 | http://www.elyaski.com
111 |
--------------------------------------------------------------------------------
/SEFilterKnob.m:
--------------------------------------------------------------------------------
1 | //
2 | // SEFilterKnob.m
3 | // SEFilterControl_Test
4 | //
5 | // Created by Shady A. Elyaski on 6/15/12.
6 | // Copyright (c) 2012 mash, ltd. All rights reserved.
7 | //
8 | // 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:
9 | //
10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11 | //
12 | // 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.
13 |
14 | #import "SEFilterKnob.h"
15 |
16 | @implementation SEFilterKnob
17 | static NSArray *observedValues = nil;
18 | + (void)initialize
19 | {
20 | static dispatch_once_t onceToken;
21 | dispatch_once(&onceToken, ^{
22 | observedValues = @[@"shadow", @"handlerColor", @"shadowColor"];
23 | });
24 | }
25 |
26 | #pragma mark - Constructors
27 | - (id)initWithFrame:(CGRect)frame
28 | {
29 | if (self = [super initWithFrame:frame])
30 | {
31 | // Default configuration
32 | _shadow = SEFilterKnob_DEFAULT_SHADOW;
33 | _shadowColor = SEFilterKnob_DEFAULT_SHADOW_COLOR;
34 | _handlerColor = SEFilterKnob_DEFAULT_HANDLER_COLOR;
35 |
36 | self.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
37 | for (NSString *keyPath in observedValues)
38 | {
39 | [self addObserver:self
40 | forKeyPath:keyPath
41 | options:0
42 | context:nil];
43 | }
44 | }
45 |
46 | return self;
47 | }
48 |
49 | #pragma mark - Drawing code
50 | - (void)drawRect:(CGRect)rect
51 | {
52 | CGContextRef context = UIGraphicsGetCurrentContext();
53 |
54 | // Save current state before applying modifications
55 | CGContextSaveGState(context);
56 |
57 | // Draw Main Circle
58 | if (_shadow)
59 | {
60 | CGColorRef shadowColor = _shadowColor.CGColor;
61 | CGContextSetShadowWithColor(context, CGSizeMake(0, 7), 10.f, shadowColor);
62 | }
63 |
64 | CGContextSetStrokeColorWithColor(context, _handlerColor.CGColor);
65 | CGContextSetLineWidth(context, 11);
66 | CGContextStrokeEllipseInRect(context, CGRectMake(6.5f, 6, 22, 22));
67 |
68 | CGContextRestoreGState(context);
69 |
70 | // Draw Outer Outline
71 |
72 | CGContextSaveGState(context);
73 |
74 | CGContextSetStrokeColorWithColor(context, [UIColor colorWithWhite:.5 alpha:.6f].CGColor);
75 | CGContextSetLineWidth(context, 1);
76 | CGContextStrokeEllipseInRect(context, CGRectMake(rect.origin.x+1.5f, rect.origin.y+1.2f, 32, 32.f));
77 |
78 | CGContextRestoreGState(context);
79 |
80 | // Draw Inner Outline
81 |
82 | CGContextSaveGState(context);
83 |
84 | CGContextSetStrokeColorWithColor(context, [UIColor colorWithWhite:.5 alpha:.6f].CGColor);
85 | CGContextSetLineWidth(context, 1);
86 | CGContextStrokeEllipseInRect(context, CGRectMake(rect.origin.x+12.5f, rect.origin.y+12, 10, 10));
87 |
88 | CGContextRestoreGState(context);
89 |
90 |
91 | CGFloat colors[8] = { 0, 0, 0, 0,
92 | 0, 0, 0, .6};
93 |
94 | CGColorSpaceRef baseSpace = CGColorSpaceCreateDeviceRGB();
95 | CGGradientRef gradient = CGGradientCreateWithColorComponents(baseSpace, colors, NULL, 2);
96 |
97 | CGContextSaveGState(context);
98 | CGContextAddEllipseInRect(context, CGRectMake(rect.origin.x+1.5f, rect.origin.y+1, 32, 32));
99 | CGContextClip(context);
100 | CGContextDrawLinearGradient (context, gradient, CGPointMake(0, 0), CGPointMake(0,rect.size.height), 0);
101 |
102 | // Memory
103 | CGGradientRelease(gradient);
104 | CGColorSpaceRelease(baseSpace);
105 |
106 | // Restore previous state
107 | CGContextRestoreGState(context);
108 | }
109 |
110 | #pragma mark - KVO
111 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
112 | {
113 | if ([observedValues containsObject:keyPath])
114 | [self setNeedsDisplay];
115 | }
116 |
117 | #pragma mark - Memory
118 | - (void)dealloc
119 | {
120 | // Remove bindings
121 | for (NSString *key in observedValues)
122 | {
123 | [self removeObserver:self
124 | forKeyPath:key];
125 | }
126 | }
127 |
128 | @end
129 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample4ViewController.xib:
--------------------------------------------------------------------------------
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 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
52 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample2ViewController.xib:
--------------------------------------------------------------------------------
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 |
31 |
32 |
33 |
34 |
35 |
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 |
73 |
74 |
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 |
101 |
--------------------------------------------------------------------------------
/SEFilterControl_Sample/Sample3ViewController.xib:
--------------------------------------------------------------------------------
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 |
31 |
32 |
33 |
34 |
35 |
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 |
71 |
81 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
--------------------------------------------------------------------------------
/SEFilterControl.m:
--------------------------------------------------------------------------------
1 | //
2 | // SEFilterControl.m
3 | // SEFilterControl_Test
4 | //
5 | // Created by Shady A. Elyaski on 6/13/12.
6 | // Copyright (c) 2012 mash, ltd. All rights reserved.
7 | //
8 | // 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:
9 | //
10 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11 | //
12 | // 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.
13 |
14 | #import "SEFilterControl.h"
15 |
16 | #define LEFT_OFFSET 25
17 | #define RIGHT_OFFSET 25
18 | #define TITLE_SELECTED_DISTANCE 5
19 | #define TITLE_FADE_ALPHA .5f
20 |
21 | #define KNOB_HEIGHT 55
22 | #define KNOB_WIDTH 35
23 |
24 | @interface SEFilterControl ()
25 | {
26 | // Cached slot width
27 | CGFloat oneSlotSize;
28 |
29 | // Hold titles count, to allows a control without labels
30 | NSUInteger titlesCount;
31 |
32 | // Dragging management
33 | BOOL dragging;
34 | CGFloat dragOffset;
35 | }
36 |
37 | @property (nonatomic, strong) NSArray *labels;
38 | @property (nonatomic, weak) SEFilterKnob *handler;
39 |
40 | @property (nonatomic, strong) IBInspectable UIColor *handlerColor;
41 | @property (nonatomic, strong) IBInspectable UIColor *handlerShadowColor;
42 | @property (nonatomic, assign) IBInspectable BOOL handlerShadow;
43 | @end
44 |
45 | @implementation SEFilterControl
46 | #if TARGET_INTERFACE_BUILDER
47 | - (void)prepareForInterfaceBuilder
48 | {
49 | [self setTitles:@[@"", @"", @""]];
50 | [self refreshSlotSize];
51 | }
52 | #endif
53 |
54 | #pragma mark - Constructors
55 | - (id)initWithCoder:(NSCoder *)decoder
56 | {
57 | if (self = [super initWithCoder:decoder])
58 | {
59 | // Force frame height
60 | self.frame = CGRectMake(CGRectGetMinX(self.frame), CGRectGetMinY(self.frame), CGRectGetWidth(self.frame), SEFilterControl_HEIGHT);
61 |
62 | // Perform common inits
63 | [self commonInits:@[@"", @"", @""]];
64 | }
65 |
66 | return self;
67 | }
68 |
69 | - (id)initWithFrame:(CGRect)frame
70 | {
71 | // Force frame height
72 | CGRect updatedFrame = CGRectMake(CGRectGetMinX(frame), CGRectGetMinY(frame), CGRectGetWidth(frame), SEFilterControl_HEIGHT);
73 |
74 | if (self = [super initWithFrame:updatedFrame])
75 | {
76 | #if TARGET_INTERFACE_BUILDER
77 | // Perform common inits
78 | [self commonInits:@[@"First", @"Second", @"Third"]];
79 | #else
80 | // Perform common inits
81 | [self commonInits:@[@"", @"", @""]];
82 | #endif
83 | }
84 |
85 | return self;
86 | }
87 |
88 | - (id)initWithFrame:(CGRect) frame titles:(NSArray *) titles{
89 | if (self = [super initWithFrame:CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, SEFilterControl_HEIGHT)]) {
90 |
91 | // Perform common inits
92 | [self commonInits:titles];
93 | }
94 |
95 | return self;
96 | }
97 |
98 | - (id)initWithFrame:(CGRect) frame titles:(NSArray *) titles labels:(NSArray *) labels{
99 | if (self = [super initWithFrame:CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, SEFilterControl_HEIGHT)]) {
100 |
101 | NSAssert2(titles.count == labels.count, @"Error, titles (%ld) and labels (%ld) must contains same objects count", titles.count, labels.count);
102 |
103 | // Perfom common inits
104 | [self applyDefaultConfiguration];
105 | [self commonInits:titles labels:labels];
106 | }
107 |
108 | return self;
109 | }
110 |
111 | - (void)applyDefaultConfiguration
112 | {
113 | self.backgroundColor = [UIColor clearColor];
114 | _progressColor = SEFilterControl_DEFAULT_PROGRESS_COLOR;
115 |
116 | _titlesFont = SEFilterControl_DEFAULT_TITLE_FONT;
117 | _titlesColor = SEFilterControl_DEFAULT_TITLE_COLOR;
118 | _titlesShadowColor = SEFilterControl_DEFAULT_TITLE_SHADOW_COLOR;
119 |
120 | _continuous = NO;
121 | }
122 |
123 | - (void)commonInits:(NSArray *)titles
124 | {
125 | [self applyDefaultConfiguration];
126 |
127 | // Create labels
128 | NSMutableArray *labels = [[NSMutableArray alloc] init];
129 |
130 | // Create labels
131 | for (NSInteger i=0; i titles.count)
214 | {
215 | UILabel *label;
216 | NSInteger labelsCount = labels.count;
217 | for (NSInteger i=titles.count; i self.frame.size.width-RIGHT_OFFSET){
479 | pnt.x = self.frame.size.width-RIGHT_OFFSET- (_handler.frame.size.width/2.f);
480 | }
481 | return pnt;
482 | }
483 |
484 | #pragma mark - Setters
485 | - (void) setSelectedIndex:(NSUInteger)index animated:(BOOL) animated
486 | {
487 | _selectedIndex = index;
488 | [self updateTitlesToIndex:index animated:animated];
489 | [self moveHandlerToIndex:index animated:animated];
490 | [self sendActionsForControlEvents:UIControlEventValueChanged];
491 | }
492 |
493 | - (void) setSelectedIndex:(NSUInteger)index {
494 | [self setSelectedIndex:index animated:NO];
495 | }
496 |
497 | - (void) setTitlesColor:(UIColor *)color{
498 | _titlesColor = color;
499 |
500 | for (UILabel *label in _labels)
501 | [label setTextColor:color];
502 | }
503 |
504 | - (void) titlesShadowColor:(UIColor *)shadowColor{
505 | _titlesShadowColor = shadowColor;
506 |
507 | for (UILabel *label in _labels)
508 | [label setShadowColor:shadowColor];
509 | }
510 |
511 | - (void) setTitlesFont:(UIFont *)font{
512 | _titlesFont = font;
513 |
514 | for (UILabel *label in _labels)
515 | [label setFont:font];
516 | }
517 |
518 | #pragma mark - Interface builder
519 | - (void) setHandlerColor:(UIColor *)handlerColor
520 | {
521 | self.handler.handlerColor = handlerColor;
522 | }
523 |
524 | - (void) setHandlerShadow:(BOOL)handlerShadow
525 | {
526 | self.handler.shadow = handlerShadow;
527 | }
528 |
529 | - (void) setHandlerShadowColor:(UIColor *)handlerShadowColor
530 | {
531 | self.handler.shadowColor = handlerShadowColor;
532 | }
533 |
534 | @end
--------------------------------------------------------------------------------
/SEFilterControl_Sample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 5C092EDA1AD686AC0056ADD4 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5C092ED91AD686AC0056ADD4 /* ViewController.xib */; };
11 | 5C1FF9C21AF4C87600D89AE7 /* Samples.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5C1FF9C11AF4C87600D89AE7 /* Samples.plist */; };
12 | 5C1FF9CC1AF4C95A00D89AE7 /* Sample1ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C1FF9CA1AF4C95A00D89AE7 /* Sample1ViewController.m */; };
13 | 5C1FF9CD1AF4C95A00D89AE7 /* Sample1ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5C1FF9CB1AF4C95A00D89AE7 /* Sample1ViewController.xib */; };
14 | 5C1FF9D31AF4C9D000D89AE7 /* Sample2ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C1FF9D11AF4C9D000D89AE7 /* Sample2ViewController.m */; };
15 | 5C1FF9D41AF4C9D000D89AE7 /* Sample2ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5C1FF9D21AF4C9D000D89AE7 /* Sample2ViewController.xib */; };
16 | 5C1FF9DA1AF4CA1400D89AE7 /* Sample3ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C1FF9D81AF4CA1400D89AE7 /* Sample3ViewController.m */; };
17 | 5C1FF9DB1AF4CA1400D89AE7 /* Sample3ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5C1FF9D91AF4CA1400D89AE7 /* Sample3ViewController.xib */; };
18 | 5C1FF9DF1AF4CA5300D89AE7 /* Sample4ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C1FF9DD1AF4CA5300D89AE7 /* Sample4ViewController.m */; };
19 | 5C1FF9E01AF4CA5300D89AE7 /* Sample4ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5C1FF9DE1AF4CA5300D89AE7 /* Sample4ViewController.xib */; };
20 | 96EB2937158B9A4600053974 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96EB2936158B9A4600053974 /* UIKit.framework */; };
21 | 96EB2939158B9A4600053974 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96EB2938158B9A4600053974 /* Foundation.framework */; };
22 | 96EB293B158B9A4600053974 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96EB293A158B9A4600053974 /* CoreGraphics.framework */; };
23 | 96EB2943158B9A4600053974 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 96EB2942158B9A4600053974 /* main.m */; };
24 | 96EB2947158B9A4600053974 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 96EB2946158B9A4600053974 /* AppDelegate.m */; };
25 | 96EB294A158B9A4600053974 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 96EB2949158B9A4600053974 /* ViewController.m */; };
26 | 96EB295C158B9A6E00053974 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 96EB295B158B9A6E00053974 /* icon.png */; };
27 | 96EB295E158B9A8D00053974 /* icon_iPad.png in Resources */ = {isa = PBXBuildFile; fileRef = 96EB295D158B9A8D00053974 /* icon_iPad.png */; };
28 | 96EB296C158B9B3000053974 /* SEFilterControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 96EB2969158B9B3000053974 /* SEFilterControl.m */; };
29 | 96EB296D158B9B3000053974 /* SEFilterKnob.m in Sources */ = {isa = PBXBuildFile; fileRef = 96EB296B158B9B3000053974 /* SEFilterKnob.m */; };
30 | AB5E73C0180493B500E1C7A8 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AB5E73BF180493B500E1C7A8 /* Default-568h@2x.png */; };
31 | /* End PBXBuildFile section */
32 |
33 | /* Begin PBXFileReference section */
34 | 5C092ED91AD686AC0056ADD4 /* ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ViewController.xib; sourceTree = ""; };
35 | 5C1FF9C11AF4C87600D89AE7 /* Samples.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Samples.plist; sourceTree = ""; };
36 | 5C1FF9C91AF4C95A00D89AE7 /* Sample1ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sample1ViewController.h; sourceTree = ""; };
37 | 5C1FF9CA1AF4C95A00D89AE7 /* Sample1ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Sample1ViewController.m; sourceTree = ""; };
38 | 5C1FF9CB1AF4C95A00D89AE7 /* Sample1ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Sample1ViewController.xib; sourceTree = ""; };
39 | 5C1FF9D01AF4C9D000D89AE7 /* Sample2ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sample2ViewController.h; sourceTree = ""; };
40 | 5C1FF9D11AF4C9D000D89AE7 /* Sample2ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Sample2ViewController.m; sourceTree = ""; };
41 | 5C1FF9D21AF4C9D000D89AE7 /* Sample2ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Sample2ViewController.xib; sourceTree = ""; };
42 | 5C1FF9D71AF4CA1400D89AE7 /* Sample3ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sample3ViewController.h; sourceTree = ""; };
43 | 5C1FF9D81AF4CA1400D89AE7 /* Sample3ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Sample3ViewController.m; sourceTree = ""; };
44 | 5C1FF9D91AF4CA1400D89AE7 /* Sample3ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Sample3ViewController.xib; sourceTree = ""; };
45 | 5C1FF9DC1AF4CA5300D89AE7 /* Sample4ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sample4ViewController.h; sourceTree = ""; };
46 | 5C1FF9DD1AF4CA5300D89AE7 /* Sample4ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Sample4ViewController.m; sourceTree = ""; };
47 | 5C1FF9DE1AF4CA5300D89AE7 /* Sample4ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Sample4ViewController.xib; sourceTree = ""; };
48 | 5C5164781AF4DEF000A08443 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; };
49 | 96EB2932158B9A4600053974 /* SEFilterControl_Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SEFilterControl_Sample.app; sourceTree = BUILT_PRODUCTS_DIR; };
50 | 96EB2936158B9A4600053974 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
51 | 96EB2938158B9A4600053974 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
52 | 96EB293A158B9A4600053974 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
53 | 96EB293E158B9A4600053974 /* SEFilterControl_Sample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SEFilterControl_Sample-Info.plist"; sourceTree = ""; };
54 | 96EB2942158B9A4600053974 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
55 | 96EB2944158B9A4600053974 /* SEFilterControl_Sample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SEFilterControl_Sample-Prefix.pch"; sourceTree = ""; };
56 | 96EB2945158B9A4600053974 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
57 | 96EB2946158B9A4600053974 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
58 | 96EB2948158B9A4600053974 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
59 | 96EB2949158B9A4600053974 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
60 | 96EB295B158B9A6E00053974 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = ../icon.png; sourceTree = ""; };
61 | 96EB295D158B9A8D00053974 /* icon_iPad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon_iPad.png; path = ../icon_iPad.png; sourceTree = ""; };
62 | 96EB2968158B9B3000053974 /* SEFilterControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEFilterControl.h; sourceTree = ""; };
63 | 96EB2969158B9B3000053974 /* SEFilterControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEFilterControl.m; sourceTree = ""; };
64 | 96EB296A158B9B3000053974 /* SEFilterKnob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SEFilterKnob.h; sourceTree = ""; };
65 | 96EB296B158B9B3000053974 /* SEFilterKnob.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SEFilterKnob.m; sourceTree = ""; };
66 | AB5E73BF180493B500E1C7A8 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; };
67 | /* End PBXFileReference section */
68 |
69 | /* Begin PBXFrameworksBuildPhase section */
70 | 96EB292F158B9A4600053974 /* Frameworks */ = {
71 | isa = PBXFrameworksBuildPhase;
72 | buildActionMask = 2147483647;
73 | files = (
74 | 96EB2937158B9A4600053974 /* UIKit.framework in Frameworks */,
75 | 96EB2939158B9A4600053974 /* Foundation.framework in Frameworks */,
76 | 96EB293B158B9A4600053974 /* CoreGraphics.framework in Frameworks */,
77 | );
78 | runOnlyForDeploymentPostprocessing = 0;
79 | };
80 | /* End PBXFrameworksBuildPhase section */
81 |
82 | /* Begin PBXGroup section */
83 | 5C1FF9BE1AF4C84A00D89AE7 /* Classes */ = {
84 | isa = PBXGroup;
85 | children = (
86 | 5C1FF9C31AF4C8C200D89AE7 /* AppDelegate */,
87 | 5C1FF9C41AF4C8C800D89AE7 /* ViewControllers */,
88 | );
89 | name = Classes;
90 | sourceTree = "";
91 | };
92 | 5C1FF9BF1AF4C84E00D89AE7 /* Resources */ = {
93 | isa = PBXGroup;
94 | children = (
95 | 5C1FF9C01AF4C85B00D89AE7 /* Data */,
96 | );
97 | name = Resources;
98 | sourceTree = "";
99 | };
100 | 5C1FF9C01AF4C85B00D89AE7 /* Data */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 5C1FF9C11AF4C87600D89AE7 /* Samples.plist */,
104 | );
105 | name = Data;
106 | sourceTree = "";
107 | };
108 | 5C1FF9C31AF4C8C200D89AE7 /* AppDelegate */ = {
109 | isa = PBXGroup;
110 | children = (
111 | 96EB2945158B9A4600053974 /* AppDelegate.h */,
112 | 96EB2946158B9A4600053974 /* AppDelegate.m */,
113 | );
114 | name = AppDelegate;
115 | sourceTree = "";
116 | };
117 | 5C1FF9C41AF4C8C800D89AE7 /* ViewControllers */ = {
118 | isa = PBXGroup;
119 | children = (
120 | 5C1FF9C61AF4C92400D89AE7 /* Samples */,
121 | 5C1FF9C51AF4C8D000D89AE7 /* Root */,
122 | );
123 | name = ViewControllers;
124 | sourceTree = "";
125 | };
126 | 5C1FF9C51AF4C8D000D89AE7 /* Root */ = {
127 | isa = PBXGroup;
128 | children = (
129 | 96EB2948158B9A4600053974 /* ViewController.h */,
130 | 96EB2949158B9A4600053974 /* ViewController.m */,
131 | 5C092ED91AD686AC0056ADD4 /* ViewController.xib */,
132 | );
133 | name = Root;
134 | sourceTree = "";
135 | };
136 | 5C1FF9C61AF4C92400D89AE7 /* Samples */ = {
137 | isa = PBXGroup;
138 | children = (
139 | 5C1FF9C71AF4C92B00D89AE7 /* Sample1 */,
140 | 5C1FF9CF1AF4C9A200D89AE7 /* Sample2 */,
141 | 5C1FF9D51AF4C9FA00D89AE7 /* Sample3 */,
142 | 5C1FF9D61AF4CA0000D89AE7 /* Sample4 */,
143 | );
144 | name = Samples;
145 | sourceTree = "";
146 | };
147 | 5C1FF9C71AF4C92B00D89AE7 /* Sample1 */ = {
148 | isa = PBXGroup;
149 | children = (
150 | 5C1FF9C91AF4C95A00D89AE7 /* Sample1ViewController.h */,
151 | 5C1FF9CA1AF4C95A00D89AE7 /* Sample1ViewController.m */,
152 | 5C1FF9CB1AF4C95A00D89AE7 /* Sample1ViewController.xib */,
153 | );
154 | name = Sample1;
155 | sourceTree = "";
156 | };
157 | 5C1FF9CF1AF4C9A200D89AE7 /* Sample2 */ = {
158 | isa = PBXGroup;
159 | children = (
160 | 5C1FF9D01AF4C9D000D89AE7 /* Sample2ViewController.h */,
161 | 5C1FF9D11AF4C9D000D89AE7 /* Sample2ViewController.m */,
162 | 5C1FF9D21AF4C9D000D89AE7 /* Sample2ViewController.xib */,
163 | );
164 | name = Sample2;
165 | sourceTree = "";
166 | };
167 | 5C1FF9D51AF4C9FA00D89AE7 /* Sample3 */ = {
168 | isa = PBXGroup;
169 | children = (
170 | 5C1FF9D71AF4CA1400D89AE7 /* Sample3ViewController.h */,
171 | 5C1FF9D81AF4CA1400D89AE7 /* Sample3ViewController.m */,
172 | 5C1FF9D91AF4CA1400D89AE7 /* Sample3ViewController.xib */,
173 | );
174 | name = Sample3;
175 | sourceTree = "";
176 | };
177 | 5C1FF9D61AF4CA0000D89AE7 /* Sample4 */ = {
178 | isa = PBXGroup;
179 | children = (
180 | 5C1FF9DC1AF4CA5300D89AE7 /* Sample4ViewController.h */,
181 | 5C1FF9DD1AF4CA5300D89AE7 /* Sample4ViewController.m */,
182 | 5C1FF9DE1AF4CA5300D89AE7 /* Sample4ViewController.xib */,
183 | );
184 | name = Sample4;
185 | sourceTree = "";
186 | };
187 | 96EB2927158B9A4600053974 = {
188 | isa = PBXGroup;
189 | children = (
190 | 5C5164781AF4DEF000A08443 /* README.md */,
191 | AB5E73BF180493B500E1C7A8 /* Default-568h@2x.png */,
192 | 96EB295F158B9ABF00053974 /* SEFilterControl */,
193 | 96EB293C158B9A4600053974 /* SEFilterControl_Sample */,
194 | 96EB2935158B9A4600053974 /* Frameworks */,
195 | 96EB2933158B9A4600053974 /* Products */,
196 | );
197 | sourceTree = "";
198 | };
199 | 96EB2933158B9A4600053974 /* Products */ = {
200 | isa = PBXGroup;
201 | children = (
202 | 96EB2932158B9A4600053974 /* SEFilterControl_Sample.app */,
203 | );
204 | name = Products;
205 | sourceTree = "";
206 | };
207 | 96EB2935158B9A4600053974 /* Frameworks */ = {
208 | isa = PBXGroup;
209 | children = (
210 | 96EB2936158B9A4600053974 /* UIKit.framework */,
211 | 96EB2938158B9A4600053974 /* Foundation.framework */,
212 | 96EB293A158B9A4600053974 /* CoreGraphics.framework */,
213 | );
214 | name = Frameworks;
215 | sourceTree = "";
216 | };
217 | 96EB293C158B9A4600053974 /* SEFilterControl_Sample */ = {
218 | isa = PBXGroup;
219 | children = (
220 | 5C1FF9BE1AF4C84A00D89AE7 /* Classes */,
221 | 5C1FF9BF1AF4C84E00D89AE7 /* Resources */,
222 | 96EB293D158B9A4600053974 /* Supporting Files */,
223 | );
224 | path = SEFilterControl_Sample;
225 | sourceTree = "";
226 | };
227 | 96EB293D158B9A4600053974 /* Supporting Files */ = {
228 | isa = PBXGroup;
229 | children = (
230 | 96EB295B158B9A6E00053974 /* icon.png */,
231 | 96EB295D158B9A8D00053974 /* icon_iPad.png */,
232 | 96EB293E158B9A4600053974 /* SEFilterControl_Sample-Info.plist */,
233 | 96EB2942158B9A4600053974 /* main.m */,
234 | 96EB2944158B9A4600053974 /* SEFilterControl_Sample-Prefix.pch */,
235 | );
236 | name = "Supporting Files";
237 | sourceTree = "";
238 | };
239 | 96EB295F158B9ABF00053974 /* SEFilterControl */ = {
240 | isa = PBXGroup;
241 | children = (
242 | 96EB2968158B9B3000053974 /* SEFilterControl.h */,
243 | 96EB2969158B9B3000053974 /* SEFilterControl.m */,
244 | 96EB296A158B9B3000053974 /* SEFilterKnob.h */,
245 | 96EB296B158B9B3000053974 /* SEFilterKnob.m */,
246 | );
247 | name = SEFilterControl;
248 | sourceTree = "";
249 | };
250 | /* End PBXGroup section */
251 |
252 | /* Begin PBXNativeTarget section */
253 | 96EB2931158B9A4600053974 /* SEFilterControl_Sample */ = {
254 | isa = PBXNativeTarget;
255 | buildConfigurationList = 96EB2953158B9A4600053974 /* Build configuration list for PBXNativeTarget "SEFilterControl_Sample" */;
256 | buildPhases = (
257 | 96EB292E158B9A4600053974 /* Sources */,
258 | 96EB292F158B9A4600053974 /* Frameworks */,
259 | 96EB2930158B9A4600053974 /* Resources */,
260 | );
261 | buildRules = (
262 | );
263 | dependencies = (
264 | );
265 | name = SEFilterControl_Sample;
266 | productName = SEFilterControl_Sample;
267 | productReference = 96EB2932158B9A4600053974 /* SEFilterControl_Sample.app */;
268 | productType = "com.apple.product-type.application";
269 | };
270 | /* End PBXNativeTarget section */
271 |
272 | /* Begin PBXProject section */
273 | 96EB2929158B9A4600053974 /* Project object */ = {
274 | isa = PBXProject;
275 | attributes = {
276 | LastUpgradeCheck = 0500;
277 | ORGANIZATIONNAME = "Shady Elyaski";
278 | };
279 | buildConfigurationList = 96EB292C158B9A4600053974 /* Build configuration list for PBXProject "SEFilterControl_Sample" */;
280 | compatibilityVersion = "Xcode 3.2";
281 | developmentRegion = English;
282 | hasScannedForEncodings = 0;
283 | knownRegions = (
284 | en,
285 | );
286 | mainGroup = 96EB2927158B9A4600053974;
287 | productRefGroup = 96EB2933158B9A4600053974 /* Products */;
288 | projectDirPath = "";
289 | projectRoot = "";
290 | targets = (
291 | 96EB2931158B9A4600053974 /* SEFilterControl_Sample */,
292 | );
293 | };
294 | /* End PBXProject section */
295 |
296 | /* Begin PBXResourcesBuildPhase section */
297 | 96EB2930158B9A4600053974 /* Resources */ = {
298 | isa = PBXResourcesBuildPhase;
299 | buildActionMask = 2147483647;
300 | files = (
301 | 5C1FF9C21AF4C87600D89AE7 /* Samples.plist in Resources */,
302 | 5C1FF9D41AF4C9D000D89AE7 /* Sample2ViewController.xib in Resources */,
303 | 96EB295C158B9A6E00053974 /* icon.png in Resources */,
304 | 5C1FF9CD1AF4C95A00D89AE7 /* Sample1ViewController.xib in Resources */,
305 | 96EB295E158B9A8D00053974 /* icon_iPad.png in Resources */,
306 | 5C092EDA1AD686AC0056ADD4 /* ViewController.xib in Resources */,
307 | 5C1FF9DB1AF4CA1400D89AE7 /* Sample3ViewController.xib in Resources */,
308 | AB5E73C0180493B500E1C7A8 /* Default-568h@2x.png in Resources */,
309 | 5C1FF9E01AF4CA5300D89AE7 /* Sample4ViewController.xib in Resources */,
310 | );
311 | runOnlyForDeploymentPostprocessing = 0;
312 | };
313 | /* End PBXResourcesBuildPhase section */
314 |
315 | /* Begin PBXSourcesBuildPhase section */
316 | 96EB292E158B9A4600053974 /* Sources */ = {
317 | isa = PBXSourcesBuildPhase;
318 | buildActionMask = 2147483647;
319 | files = (
320 | 5C1FF9CC1AF4C95A00D89AE7 /* Sample1ViewController.m in Sources */,
321 | 5C1FF9DF1AF4CA5300D89AE7 /* Sample4ViewController.m in Sources */,
322 | 96EB2943158B9A4600053974 /* main.m in Sources */,
323 | 96EB2947158B9A4600053974 /* AppDelegate.m in Sources */,
324 | 96EB294A158B9A4600053974 /* ViewController.m in Sources */,
325 | 5C1FF9D31AF4C9D000D89AE7 /* Sample2ViewController.m in Sources */,
326 | 96EB296C158B9B3000053974 /* SEFilterControl.m in Sources */,
327 | 5C1FF9DA1AF4CA1400D89AE7 /* Sample3ViewController.m in Sources */,
328 | 96EB296D158B9B3000053974 /* SEFilterKnob.m in Sources */,
329 | );
330 | runOnlyForDeploymentPostprocessing = 0;
331 | };
332 | /* End PBXSourcesBuildPhase section */
333 |
334 | /* Begin XCBuildConfiguration section */
335 | 96EB2951158B9A4600053974 /* Debug */ = {
336 | isa = XCBuildConfiguration;
337 | buildSettings = {
338 | ALWAYS_SEARCH_USER_PATHS = NO;
339 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
340 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
341 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
342 | COPY_PHASE_STRIP = NO;
343 | GCC_C_LANGUAGE_STANDARD = gnu99;
344 | GCC_DYNAMIC_NO_PIC = NO;
345 | GCC_OPTIMIZATION_LEVEL = 0;
346 | GCC_PREPROCESSOR_DEFINITIONS = (
347 | "DEBUG=1",
348 | "$(inherited)",
349 | );
350 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
351 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
352 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
353 | GCC_WARN_UNUSED_VARIABLE = YES;
354 | IPHONEOS_DEPLOYMENT_TARGET = 6.0;
355 | ONLY_ACTIVE_ARCH = YES;
356 | SDKROOT = iphoneos;
357 | TARGETED_DEVICE_FAMILY = "1,2";
358 | };
359 | name = Debug;
360 | };
361 | 96EB2952158B9A4600053974 /* Release */ = {
362 | isa = XCBuildConfiguration;
363 | buildSettings = {
364 | ALWAYS_SEARCH_USER_PATHS = NO;
365 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
366 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
367 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
368 | COPY_PHASE_STRIP = YES;
369 | GCC_C_LANGUAGE_STANDARD = gnu99;
370 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
371 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
372 | GCC_WARN_UNUSED_VARIABLE = YES;
373 | IPHONEOS_DEPLOYMENT_TARGET = 6.0;
374 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
375 | SDKROOT = iphoneos;
376 | TARGETED_DEVICE_FAMILY = "1,2";
377 | VALIDATE_PRODUCT = YES;
378 | };
379 | name = Release;
380 | };
381 | 96EB2954158B9A4600053974 /* Debug */ = {
382 | isa = XCBuildConfiguration;
383 | buildSettings = {
384 | CLANG_ENABLE_OBJC_ARC = YES;
385 | CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO;
386 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
387 | GCC_PREFIX_HEADER = "SEFilterControl_Sample/SEFilterControl_Sample-Prefix.pch";
388 | INFOPLIST_FILE = "SEFilterControl_Sample/SEFilterControl_Sample-Info.plist";
389 | IPHONEOS_DEPLOYMENT_TARGET = 6.0;
390 | PRODUCT_NAME = "$(TARGET_NAME)";
391 | WRAPPER_EXTENSION = app;
392 | };
393 | name = Debug;
394 | };
395 | 96EB2955158B9A4600053974 /* Release */ = {
396 | isa = XCBuildConfiguration;
397 | buildSettings = {
398 | CLANG_ENABLE_OBJC_ARC = YES;
399 | CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO;
400 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
401 | GCC_PREFIX_HEADER = "SEFilterControl_Sample/SEFilterControl_Sample-Prefix.pch";
402 | INFOPLIST_FILE = "SEFilterControl_Sample/SEFilterControl_Sample-Info.plist";
403 | IPHONEOS_DEPLOYMENT_TARGET = 6.0;
404 | PRODUCT_NAME = "$(TARGET_NAME)";
405 | WRAPPER_EXTENSION = app;
406 | };
407 | name = Release;
408 | };
409 | /* End XCBuildConfiguration section */
410 |
411 | /* Begin XCConfigurationList section */
412 | 96EB292C158B9A4600053974 /* Build configuration list for PBXProject "SEFilterControl_Sample" */ = {
413 | isa = XCConfigurationList;
414 | buildConfigurations = (
415 | 96EB2951158B9A4600053974 /* Debug */,
416 | 96EB2952158B9A4600053974 /* Release */,
417 | );
418 | defaultConfigurationIsVisible = 0;
419 | defaultConfigurationName = Release;
420 | };
421 | 96EB2953158B9A4600053974 /* Build configuration list for PBXNativeTarget "SEFilterControl_Sample" */ = {
422 | isa = XCConfigurationList;
423 | buildConfigurations = (
424 | 96EB2954158B9A4600053974 /* Debug */,
425 | 96EB2955158B9A4600053974 /* Release */,
426 | );
427 | defaultConfigurationIsVisible = 0;
428 | defaultConfigurationName = Release;
429 | };
430 | /* End XCConfigurationList section */
431 | };
432 | rootObject = 96EB2929158B9A4600053974 /* Project object */;
433 | }
434 |
--------------------------------------------------------------------------------