Important facts about commercial licenses

  • Licenses are perpetual. They do not expire and do not need to be renewed.
  • Licenses can be upgraded. You can upgrade to a more expensive license later paying only the difference in cost.
  • Pay attention to the distribution type - Hosted (sites / servers), binary (applications) or source (includes all the others). Choose according to your needs (more below).
  • All licenses allow commercial use unless otherwise indicated.
  • Read the full license by clicking on the icon.
  • Read more about licenses in our handy license guide.
Free

MIT License

Unlimited projects Source and binary distribution Non-commercial use only Attribution required
You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

iOS Filter Control

iOS Filter Control
Developed by Shady Ahmed Elyaski, Released Jun 24, 2012

An iOS Filter UIControl Subclass. Zero Graphics. Highly Customizable.

Objective-C

Tags: ios filter control , national geographic , parks guide

An iOS filter slider UIControl subclass, without images. Highly customizable.

Inspired by National Geographics: Park Guides.

Installation

  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.
  2. Start using this new UIControl Subclass!

SDK Support

It supports iOS 4 to iOS 6

Screenshot

Here's a screenshot for different variations

My image

You may watch a demo video on Youtube

Documentation

The class is not very well documented. I tried documenting drawing code as much as I could.

There are sample codes that illustrate various parameters.

Usage

Creating your filter

Somewhere, for example in your viewDidLoad, alloc and init the filter UIControl:

SEFilterControl *filter = [[SEFilterControl alloc]initWithFrame:CGRectMake(10, 20, 300, 70) Titles:[NSArray arrayWithObjects:@"Articles", @"News", @"Updates", @"Featured", @"Newest", @"Oldest", nil]];

This initializes our Filter Control using CGRect and Titles Array of NSStrings.

Note That height of the control is predifined as 70 and can't be changed

Then, add target for Value Change Event handling:

[filter addTarget:self action:@selector(filterValueChanged:) forControlEvents:UIControlEventValueChanged];

Don't forget to impelment the handler we specified later:

-(void)filterValueChanged:(SEFilterControl *) sender{
    NSLog(@"%@", [NSString stringWithFormat:@"%d", sender.SelectedIndex]);
}

Adding to your UIView & releasing the object:

[self.view addSubview:filter];
[filter release];

Customizing your filter

To change the track color:

[filter setProgressColor:[UIColor lightGrayColor]];

To change the handler color:

[filter setHandlerColor:[UIColor darkGrayColor]];

To change the Titles text color:

[filter setTitlesColor:[UIColor blackColor]];

To change the Titles text font:

[filter setTitlesFont:[UIFont fontWithName:@"Didot" size:14]];

Acknowledgment

Special thanks to mash, Ltd. team for their support.

License

This Code is released under the MIT License by Shady Elyaski

Would love to hear from you when you use this custom UIControl in your project!

User Reviews

No reviews have been submitted yet.

Questions & Comments


Or enter your name and Email
No comments have been posted yet.
You must be logged-in to vote. Log-in to your account or register now.