Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight text color #148

Closed
ryanmsusa opened this issue Jun 14, 2013 · 3 comments
Closed

Highlight text color #148

ryanmsusa opened this issue Jun 14, 2013 · 3 comments
Labels

Comments

@ryanmsusa
Copy link

Is there any way to have a text label 2 colors and also have the highlight color 2 colors.

By highlight color I mean for example when pressing on a tableviewcell

@AliSoftware
Copy link
Owner

You want only one OHAttributedLabel with an attributedString composed of multiple colors, or multiple OHAttributedString with a different color each?

For the second case, the solution is obvious: configure each instance with the wanted color.

For the first case, it is not currently possible. But we could imagine adding a delegate method that works the same way it does for the linkColors (see lines 240 and 250 of OHAttributedLabel.m), using the color returned by the delegate if the delegate method is implemented, and the color in the property if not. Feed free to propose a pull request for that (sorry but I won't have time to add that code myself, but if you do I can easily merge)

@DZamataev
Copy link

Certainly not OHAttributedString but NSAttributedString.

@TamilRaja
Copy link

HI

I have change the background colour using singleton class. Any ideas or sample code (IOS) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants