creating border for uitableview

后端 未结 3 825
再見小時候
再見小時候 2020-12-14 16:47

I am using a uitableview and scrollview in a uiview. How to set a border for table or scrollview?

3条回答
  •  余生分开走
    2020-12-14 17:32

    #import  "QuartzCore/QuartzCore.h"
    

    then in viewDidLoad use,

    tableView.layer.borderWidth = 2.0;
    

    Note

    You can also set the border color:

    tableView.layer.borderColor = [UIColor redColor].CGColor;
    

    It should work for you. :)

提交回复
热议问题