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

How to create two lines Inside the circle Progress Bar? #18

Closed
miskeen110 opened this issue Feb 6, 2017 · 1 comment
Closed

How to create two lines Inside the circle Progress Bar? #18

miskeen110 opened this issue Feb 6, 2017 · 1 comment

Comments

@miskeen110
Copy link

Hi,
How to create two lines inside circle progress Bar.
For Example first line contain one string and other lines contain other string.
Is it possible?

@Eclair
Copy link
Owner

Eclair commented Feb 7, 2017

Hi @miskeen110,

I believe you can easily achieve it using \n symbol for line break in text. For example:

[_circleProgressBar setHintTextGenerationBlock:^NSString *(CGFloat progress) {
  return [NSString stringWithFormat:@"Progress: %.0f \nMore Text", progress * 255];
}];

will result in something like:

Progress 39%
More Text

If you want to use different text style for 1st and 2nd line - I would suggest you to use setHintAttributedGenerationBlock with AttributedString instead.

Does it solves your problem?

Thanks!

@Eclair Eclair closed this as completed Feb 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants