Draw lines in iOS storyboard similar to Android's XML lines

ios, line, uistoryboard, uiview

Solution

You can create a generic `UIView` and set its `width` or `height` to 1 pt in a storyboard. Set its `backgroundColor` to what you want the line to be. Make sure you set its constraints or resizing mask so that it doesn't grow in width/height when the screen is resized.

Problem

In Android I can draw lines by simple creating a view and setting its background color ``` <LinearLayout...> ... <View android:layout_width="1dp" android:layout_height="match_parent" android:background="@color/black" ... <View android:layout_width="match_parent" android:layout_height="2dp" android:background="@color/red" ... </LinearLayout> ``` This is a common practice in Android. How might I do the same in iOS? What's the common practice? I see another question here trying to ask a similar question but was told to use a TableView. I am looking for something as simple and as general as the Android answer.

Original source