Reputation: 44886
I have a UIWebView
in a Cocoa Touch app that may be different widths depending on device, sidebar (really, the master view of a split view controller) and orientation.
How can I set the content to always be the width of the view?
I've tried setting the width of the viewport to device-width
. This works perfectly on the iPhone, but on the iPad doesn't take the sidebar into consideration.
Upvotes: 1
Views: 247
Reputation: 82565
I find that setting initial-scale=1.0, maximum-scale=1.0
for the viewport, and leaving device-width
unset, gives me the effect I want. Might not be exactly what you want.
Upvotes: 1