Search code examples
iosswiftbackgrounduisegmentedcontrolboundary

Segmented Control is not getting attached to its boundary


I have created a UISegmentedControl in the UIStoryboard but it is not attaching to its background. The issue is shown below. Is there any solution for this? Thanks in advance!. enter image description here

I have given the constraints like this: enter image description here


Solution

  • Same issue I found. I have solved this issue by setting the auto-size in the size inspector to Equal widths.