zoukankan      html  css  js  c++  java
  • iOS UITableViewCell透明度 和 cell文字居中

    1、创建UITableViewCell时,的模式用UITableViewCellStyleValue1时,透明度直接将UITableView的透明度设置以下就搞定拉,但是文字居中难以实现。

    2、创建UITableViewCell时,的模式用UITableViewCellStyleDefault时,文字居中直接用

     

    cell.textAlignment = UITextAlignmentCenter;

    就搞定拉,但是只设置UITableView的透明度,背景透明难以实现

    透明度具体实现代码:

     

    cell.opaque = NO;

    cell.textLabel.backgroundColor = [UIColor clearColor];

    [cell setBackgroundColor:[UIColor colorWithRed:1 green:1 blue:1 alpha:0.2]];

    并且将UITableView的透明度设置一下就搞定拉。


    欢迎大侠们提出宝贵意见。

  • 相关阅读:
    Freemarker-2.3.22 Demo
    Freemarker-2.3.22 Demo
    Freemarker-2.3.22 Demo
    Freemarker-2.3.22 Demo
    Oracle PLSQL Demo
    Oracle PLSQL Demo
    Oracle PLSQL Demo
    Oracle PLSQL Demo
    Oracle PLSQL Demo
    Oracle PLSQL Demo
  • 原文地址:https://www.cnblogs.com/james1207/p/3324985.html
Copyright © 2011-2022 走看看