Search code examples
iosiphoneuitoolbaruisegmentedcontrol

Bar segmented control has padding in Toolbar on iOS7 iphone 5s real device


I am running into an issue. The toolbar adds padding at front of iOS7 iphone 5s real device.

error images;

however, the issue does not see on simulator nor iOS7 iphone 4s devices.

My configuration is as

Ui Confguration

Anyone can point out what might be wrong? Thanks in advance


Solution

  • Even I faced the same issue (however, was seeing it in both simulator as well as device). I used setWidth message to limit the width of each segment. So, something like :-

    [segmentedControl setWidth:75.0f forSegmentAtIndex:0];
    

    should solve this issue. I was not using storyboards though