TransitApp / SVWebViewController

A drop-in inline browser for your iOS app.
MIT License
2.58k stars 516 forks source link

Create from interfacebuilder #31

Closed skooter500 closed 11 years ago

skooter500 commented 11 years ago

Hi Sam

Beautiful library! I am hoping to use it in my app Tunepal. A question for you...

Whats the best way to use this in a tab (in a tab bar) in interface builder? What I have done is: Created subclasses of SVWebViewController Overiden the - (id)initWithCoder:(NSCoder *)inCoder method and called: return [[super initWithCoder:inCoder]initWithURL:url];

Set the tab to be a subclass of SVWebViewController

Somehow I dont think this is right :-)

What is happening is:

The tabs are displaying ok with the appropriate url, but not handling rotations correctly. Portrait is ok, but when I rotate to landscape, the width stays the same.. It could be because my MainWindow.mm which contains the tab controller implements autolayout and perhaps this "property" is getting passed into the SVWebViewConroller, however my map tab displays and rotates ok...

Any ideas?

Bryan

skooter500 commented 11 years ago

Sam

Sorry Ive noticed this behaviour is URL dependant ad probably nothing to do with AutoLayout...

It works ok with:

http://www.youtube.com

But demonstrates the problem with:

http://tunepal.wordpress.com

Bryan

samvermette commented 11 years ago

Since the landscape mode works in the demo project when you push SVWebVC into a nav controller stack, then I would assume this has to do with your tab VC or the way things are set up in IB. Unfortunately I'm not a big fan of IB, so I can't really help you on that end, sorry.