Search code examples
iphoneiosios5uiviewuiviewcontroller

How to add a horizontal line in iOS using StoryBoard?


In my app I am trying to create a customized/stylish horizontal line in-between two labels. I have searched in SO and Google but it has only by code. How to add a horizontal line using story board?

In Android I have designed the below line using XML.

enter image description here

How can I create the same line in iOS?


Solution

  • You just have 2 options:

    • take an image with the appropriate gradient and insert an image view
    • make yourself a view class, that fills it's view with a gradient (by code)

    That's it