Comments (2)
roadmap:
- add interface for disabling; idea: by a delegate
-(BOOL)segmentedControl:(NYSegmentedControl *)sc isIndicatorEnabledAtIndex:(NSUInteger)index
- new settings for the color of the disabled indicators
- implement disabling:
- if one tap : nothing happens (easy)
- sliding : more difficult? I have no idea (have to look at your code)
- when selected by code: nothing happens (easy)
----> what do you think?
from nysegmentedcontrol.
BETTER idea:
add a delegate for the "should select"
@protocol NYSegmentedControlDelegate <NSObject>
- (BOOL)segmentedControl:(NYSegmentedControl *)segmentedControl shouldSelectIndex:(NSUInteger)index ;
@end
add a datasourcer for the color
@protocol NYSegmentedControlStyler <NSObject>
- (UIColor *)segmentedControl:(NYSegmentedControl *)segmentedControl colorForTitleAtIndex:(NSUInteger)index ;
- (UIFont *)segmentedControl:(NYSegmentedControl *)segmentedControl fontForTitleAtIndex:(NSUInteger)index ;
@end
What do you think? Good idea? I might need help for managing the case of sliding when a indicator is not selectable.
But for the rest, if you are OK, I can do a PR.
from nysegmentedcontrol.
Related Issues (20)
- The Chinese word display error on ios7 HOT 1
- How to support chinese text? HOT 3
- 放入NavigationItem titleView中 不能使用中文 HOT 2
- It will be great if it supports AttributedStrings HOT 1
- Strange thin line on the right side of selected indicator HOT 5
- New feature: adding delegates HOT 3
- Issue with the mask on the title HOT 11
- Border-Bottom
- crash when drag the segment button HOT 2
- Deviation 1px when displaying chinese/japanese text HOT 2
- Unable to set indicator's corner radius HOT 1
- Issue when using clear background HOT 2
- Library not compiled for iOS version below 9.1
- Can images be used instead of section titles?
- Text Color issue when dragging HOT 1
- UISegmentedControlNoSegment HOT 1
- Chinese display problems ... HOT 4
- NavigationItem titleView from left bar button to right bar button
- - (void)setTitle:(NSString *)title forSegmentAtIndex:(NSUInteger)index have a bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nysegmentedcontrol.