I have created a UISegmentedControl
subclass that I would like to use as the section header view for a UITableView
.
I would like the custom UISegmentedControl
subclass to have a height of 50pt.
I am aware that I can create a height constraint for this. However, after setting the height constraint, if this segmented control is used as the section header of the table view, then auto layout errors are shown ( see question ).
I tried setting height by calling the init(frame:) method with appropriate height, but this has no effect.
Is there a way to set the height of the UISegmentedControl
subclass without using auto layout?