IOS开发经常使用知识点

  1. 添加背景色code

    在viewDidLoad方法中添加:it

    self.view.backgroundColor = [UIColor yellowColor];

    自定义颜色:table

     

self.view.backgroundColor = [UIColor colorWithRed:240/255.0 green:240/255.0 blue:240/255.0 alpha:1];方法

1. 去掉UITableView中多余的横线

    在viewDidLoad方法中添加:
    ```
self.tableView.tableFooterView = [UIView new];
  1. 让UITableView横线从最左侧开始绘制tab

    在viewDidLoad方法中添加:view

    self.tableView.separatorInset = UIEdgeInsetsMake(0,2, 0, 2);//设置端距,这里表示左右距离为2
相关文章
相关标签/搜索