문제

the subject says it all: I have a few UITableViews from an iPhone version of my app, that I want to use in the iPad version. For that I'm using the container view object, that "imports" the existing tableview inside of another (bigger) view-controller. Works fine.

But it looks kind of odd, since the borders of the tableview is not displayed. I the image below, you see the layout of the designer on the left side, my containerview on the right side. The "border-frame" on the right side is missing.

I wonder if there is a way to get this border. I the docs I didn't find anything helpful.

Q1: is there a standard property etc to get this frame?

Q2: if not - how would you guys do it? I guess, I could just put an empty view with the frames background color behind the container frame. Any better workaround out there?

enter image description here

도움이 되었습니까?

해결책

I don't know about this issue but I think that it can be solved by using these properties

tableView.layer.borderColor = THE_COLOR;
tableView.layer.borderWidth = 1.f;

Also, you may want to use SparkInspector or Reveal to properly debug the UI. You can set and inspect any property that you want at runtime using these apps.

다른 팁

Put the table view centered into a view that is 2 pt larger and set the backgroundColor of the outer view to the border color.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top