开发者

Strange black bars in UITableView

I'm really scratching my head over this one: When I make visible the Toolbar of the navcontroller in my view hierarchy, strange black bars appear at the top and bottom of the table view. http://grab.by/8pgz

The app is universal, and on the iPhone simulator (or device) this does not show up, although they use the same UITableViewController subclass.

I cannot even figure out what the extra bars are, which makes it even harder to come up with a solution.

They are, however, not navbar / toolbar. They are not section or table view header / footer. It does not merely seem to be a resizing of the table view either, since its background is not black.

The custom table view controller sits inside a UINavigationController, which in 开发者_运维百科turn is inside a UISplitViewController. Pretty standard, as far as I understand.

Like said, they do not show up on the phone - nor do they appear in the popover in portrait orientation.

I'm really out of clues here. Any suggestions would be most welcome.

Cheers,

Gregor Sweden

Update: Problem solved by moving the code for making toolbar visible to -(void)awakeFromNib method instead of -(void)viewDidLoad. Still don't know what went wrong, but now at least it works.


I believe there is a problem with the frame you're trying to use to initialize the tableView.

myTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, height, width);

Try changing the height width variables in code, to reflect your height & width on the iPad.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜