There is another way to set the table border.
1.You just add a UIView that is slightly larger than the table view. Add a table view as a subview of the view.
Like, if the table frame size is (2,2,100, 200), then the view size should be (0,0,104,204).
2. Set the backgroundColor view as you want to set the border color.
iPhoneDv
source share