在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:ShadyElyaski/ios-filter-control开源软件地址:https://github.com/ShadyElyaski/ios-filter-control开源编程语言:Objective-C 98.5%开源软件介绍:iOS Filter ControlAn iOS Filter UIControl Subclass. Zero Graphics. Highly Customizable. Inspired by National Geographics: Park Guides. ScreenshotHere's a screenshot for different variations You may watch a demo video on Youtube InstallationCocoapods: pod 'SEFilterControl' Manual:
SDK SupportIt supports iOS 5 to iOS 8 Live rendering in Interface builder will require Xcode 6.x UsageCreating your filterBy CodeSomewhere, for example in your viewDidLoad, alloc and init the filter UIControl:
This initializes our Filter Control using CGRect and Titles Array of NSStrings. Note That height of the control is predefined as 70 and can't be changed Use SEFilterControl_HEIGHT const for reference. Then, add target for Value Change Event handling:
Don't forget to implement the handler we specified later:
Adding to your UIView:
Via Interface builderAdd a new UIView to your xib, and update its class to SEFilterControl. Bind a UIAction to the valueChanged event of your control. Enjoy ;) ConfigurationFilter| Property | Effect | Default value | |:-------------:|-------------|-----|-----| | progressColor | Progress track color | SEFilterControl_DEFAULT_PROGRESS_COLOR | | titlesFont | Configure all titles font | SEFilterControl_DEFAULT_TITLE_FONT | | titlesColor | Configure all titles color | SEFilterControl_DEFAULT_TITLE_COLOR | | titlesShadowColor | Configure all titles shadow color | SEFilterControl_DEFAULT_TITLE_SHADOW_COLOR | Knob| Property | Effect | Default value | |:-------------:|-------------| -----|---| | handlerColor | Configure knob color | SEFilterKnob_DEFAULT_HANDLER_COLOR | | shadowColor | Configure knob shadow color | SEFilterKnob_DEFAULT_SHADOW_COLOR | | shadow | Enable / sisable shadow | SEFilterKnob_DEFAULT_SHADOW | Continuous modeIf 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. UIAppearanceSEFilterControl and SEFilterKnob declare UIAppearance methods, allowing you to style all instances at a time. AcknowledgmentSpecial thanks to mash, Ltd. team for their support. Thanks to Nicolas Goutaland for the updated version. LicenseThis 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! Cheers, Shady A. Elyaski |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论