【问题标题】:set tint for uiview background color设置 uiview 背景颜色的色调
【发布时间】:2011-05-16 02:09:33
【问题描述】:

如何将色调颜色设置为 uiview 背景颜色? 谢谢。

【问题讨论】:

    标签: iphone uiview colors background tint


    【解决方案1】:

    设置UIView 视图的backgroundColor 属性:

    UIView *myView;
    UIColor *myTint;
    ...
    /* initialize myView and myTint */
    ...
    myView.backgroundColor = myTint;
    ...
    /* release myTint, if necessary */
    

    【讨论】:

    • toolbar.tintColor = [UIColor blackColor];我想要的是 uiview 的相同效果。顺便说一句,工具栏是 UIToolbar
    • UIView 没有 tintColor 属性。使用backgroundColor,就像使用tintColor 代替toolbar 一样,或者更清楚地解释你真正想要做什么。
    • 我想为 uiview 提供渐变背景色。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多