Weird background offset of UIToolbar when in formSheet.

Posted by Mike A on Stack Overflow See other posts from Stack Overflow or by Mike A
Published on 2010-06-02T20:02:33Z Indexed on 2010/06/02 20:04 UTC
Read the original article Hit count: 306

Filed under:
|
|

As you can see in the pic, the buttons from the toolbar on the right align perfectly with the segmented control on the left. They are displayed on the navigation bar. For some reason though, the background of the toolbar seems to be offset 1px to the bottom.

alt text

What is especially weird, is this exact same view controller, in fullScreen or even pageSheet, displays everything properly.

Segmented control is being allocated:

UISegmentedControl* segmentControl = [[UISegmentedControl alloc] initWithFrame:CGRectMake(0,0,300,30)];

Toolbar is being allocated:

UIToolbar* toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 100,44)];

I've spent hours trying to fix this, it's driving me crazy.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk