Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
292 views
in Technique[技术] by (71.8m points)

ios - creating border for uitableview

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
#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. :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...