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

white bar at ios 8.4 #3

Closed
qiyadeng opened this issue Mar 26, 2016 · 2 comments
Closed

white bar at ios 8.4 #3

qiyadeng opened this issue Mar 26, 2016 · 2 comments

Comments

@qiyadeng
Copy link

It works ok at ios 9.0,but it only dispear an whte bar in ios 8.4?

@dashi001
Copy link

dashi001 commented May 6, 2016

在layoutSubviews方面里面修改
//configure bgView
self.bgView.frame = CGRectMake(leftRightMargin, (viewHeight - self.itemHeight?:kItemHeight)/2, viewWidth - 2_kLeftRightMargin, self.itemHeight?:kItemHeight);
/_*
* 在初始化label的rect之前,给itemWidth、itemHeight重新赋值,保证iOS7能正常显示
*/
itemWidth = CGRectGetWidth(self.bgView.frame)/count;
itemHeight = CGRectGetHeight(self.bgView.frame);

//configure items
[self.items enumerateObjectsUsingBlock:^(RFSegmentItem * _Nonnull item, NSUInteger idx, BOOL * _Nonnull stop) {
    item.frame = CGRectMake(initX, initY, itemWidth, itemHeight);
    initX += itemWidth;
}];

@wangruofeng
Copy link
Owner

尝试最新版本,UI布局异常的bug已经修复

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

3 participants