Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
175 views
in Technique[技术] by (71.8m points)

ios - UISplitView with UITabbar

I have a strange one that I can not seem to fix. I am currently working on updating my app to iOS7. This all worked in iOS6. It is an universal app and thus uses same xib files. However the iPad uses UISplitViews on some. Like I said, this all worked in iOS6 oh this all works on the iPhone too.

The problem is a grey bar at the bottom. I changed the tab bar to be opaque to move views up properly as i had some UI clipped to bottom of views and that went underneath the tab bar, sidetracked there. But if i set it back to translucent bar, it goes underneath but stretched properly. if i dont, it adds a bar. Other tabs work fine when NOT using splitview.

The UISplitviewController is added programmatically.

See attached image for better description.

The grey bar is between my splitview and tabbar

This I have tried:

  • Added autoresize on splitview
  • Checked xib for subviews in the splitviews to have auto resize
  • Tried to force splitview to be screen bounds
  • Removed clips to bounds on all views
  • Removed autoresize subviews

Any ideas would be welcomed.

Thank you all.

UPDATE:

setting the background colour the uisplitview, it does colour the bar black. So the uisplitview is definitely stretching to it.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I subclassed UISplitViewController and added the line below to viewDidLoad and that fixed the grey line.

self.extendedLayoutIncludesOpaqueBars = YES;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...