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

设置titleScrollViewColor失效 无法修改背景颜色 #27

Open
CoderMikeHe opened this issue Jan 8, 2017 · 1 comment
Open

设置titleScrollViewColor失效 无法修改背景颜色 #27

CoderMikeHe opened this issue Jan 8, 2017 · 1 comment

Comments

@CoderMikeHe
Copy link

// 一次性设置所有标题属性

  • (void)setUpTitleEffect:(void(^)(UIColor **titleScrollViewColor,UIColor **norColor,UIColor **selColor,UIFont **titleFont,CGFloat *titleHeight,CGFloat *titleWidth))titleEffectBlock{
    UIColor *titleScrollViewColor;
    UIColor *norColor;
    UIColor *selColor;
    UIFont *titleFont;
    if (titleEffectBlock) {
    titleEffectBlock(&titleScrollViewColor,&norColor,&selColor,&titleFont,&_titleHeight,&_titleWidth);
    if (norColor) {
    self.norColor = norColor;
    }
    if (selColor) {
    self.selColor = selColor;
    }
    if (titleScrollViewColor) {

// _titleScrollViewColor = titleScrollViewColor; 这里应该用self.titleScrollView 否则不走setter方法
self.titleScrollViewColor = titleScrollViewColor;
}
_titleFont = titleFont;
}

if (_titleColorGradientStyle == YZTitleColorGradientStyleFill && _titleWidth > 0) {
    @throw [NSException exceptionWithName:@"YZ_ERROR" reason:@"标题颜色填充不需要设置标题宽度" userInfo:nil];
}

}

@ieliwb
Copy link

ieliwb commented Apr 14, 2017

谢谢,搞了很久,我说怎么颜色修改了没反应 @CoderMikeHe

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