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

iOS10 setting title attributes causes title hidden #203

Closed
yudun1989 opened this issue Jun 28, 2016 · 11 comments
Closed

iOS10 setting title attributes causes title hidden #203

yudun1989 opened this issue Jun 28, 2016 · 11 comments

Comments

@yudun1989
Copy link

self.control.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor blackColor],  NSFontAttributeName:[UIFont systemFontOfSize:14]};
self.control.selectedTitleTextAttributes = @{NSForegroundColorAttributeName : [UIColor blueColor], NSFontAttributeName:[UIFont systemFontOfSize:14]};
[self.control setSectionTitles:@[@"hello", @"loha", @"aloha"]];

title disappears after set title TextAttributes

@loumzy
Copy link

loumzy commented Jul 5, 2016

i have the same problem. this bug comes when title is short. for example, title hides when it sames like "全部" but show again when it becomes "全部订单"

@loumzy
Copy link

loumzy commented Jul 5, 2016

there may something wrong when setting title to the segment.
when title font is big like 20.0f, the bug don't show, but when font is small like 12.0f, the bug shows.

@yudun1989
Copy link
Author

@loumzy
#202

@davroux
Copy link

davroux commented Jul 13, 2016

It seems to also occur on iOS 9.x. We have some short title disappearing in our release app.

@HeshamMegid
Copy link
Owner

Hey everyone,

Please check the Swift version of HMSegmentedControl at https://github.com/HeshamMegid/HMSegmentedControl-Swift/.

It should solve this issue.

@BananaPukeh
Copy link

@HeshamMegid
Is this issue going to be fixed in the ObjC version? Since I'm using MXSegmentedPager which uses this library as dependency

@davroux
Copy link

davroux commented Aug 29, 2016

Same, we are using in a lot of our VC.

@yudun1989
Copy link
Author

@rutger588 @davroux HeshamMegid had merged the branch which already fixed this issue #202

@maarek
Copy link

maarek commented Sep 12, 2016

Pulling in master did not fix this issue for me. The title label seems to be missing completely on iOS 10 when viewed from the View Hierarchy.

edit: It seems that padding my strings with whitespace gets it to appear properly. The titles are years so 4 chars long "2016" turns to " 2016 ".

@NorwaySmith
Copy link

Title not shown when build with iOS 10.0 .

@lp380490944
Copy link

thank you . now solved my problem!

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

8 participants