Closed max-mapper closed 11 years ago
I'm fixing this - don't know how this is synced to phonegap-plugins, i'll fix both and send a pr here
Updated ChildBrowser in phonegap-plugins: https://github.com/phonegap/phonegap-plugins/commit/d4ce61db03cd4f9b69f075b8ca148637c04f713c
Tested on iOS 5 and iOS 6.
awesome! thanks shaz
if App in landscape, after closing childbrowser the view resizes wrongly with a black rectangle on the right, like if it was in portrait (ipad3 ios6). found many with this bug, where could be the bug? i'd love to help but i need some directions on the Cordova 2.0 vs. 2.1 orientation issue, it's still not clear to me
I'm experiencing the same problem as regrunge reported after applying an update to MainViewController.m. This update corrects the viewport offset for iOS6 as posted by petersjay:
(void)viewWillAppear:(BOOL)animated { // Set the main view to utilize the entire application frame space of the device. // Change this to suit your view's UI footprint needs in your application. self.view.frame = [[UIScreen mainScreen] applicationFrame];
[super viewWillAppear:animated]; }
Adding this results in the behavior described by regrunge. Removing it results in the top of the view disappearing behind the iOS statusbar, but will leave the orientation correct after returning from ChildBrowser.
Same problem as regrunge (iPad 3, 5.1.1)
I've reset the self.view.frame in MainViewController.m like this:
(void)viewWillAppear:(BOOL)animated {
// Set the main view to utilize the entire application frame space of the device. // Change this to suit your view's UI footprint needs in your application. self.view.frame = CGRectMake(0,0,[[UIScreen mainScreen] applicationFrame].size.height,[[UIScreen mainScreen] applicationFrame].size.width);
[super viewWillAppear:animated]; }
seems to work if landscape only, but please an expert that could test it? maybe with an if statement checking the orientation?
ok i've tried to make the IF statement:
Thanks regrunge, the IF statement works for me!
Cool now I got a similar problem with the barcodescanner ;( ! I read about child views but that little trick doesn't work on the barcode. I f only I knew objective-c....
Will childbrowser be updated to include this fix?
I have actually "hacked" Cordova not Childbrowser, and I don't know what are they doing for orientation's problems in Cordova (Phonegap).
Oh this thing.
Looks like @shazron's patch doesn't apply easily - I'll port the relevant parts into here and close when done.
@shazron: do you know what versions of Cordova the patched version works with?
I am running into strange issue, when the ChildBrowser closes the main view inherits the ChildBrowser dimensions, so for e.g if the MainView had a long long HTMl page and was able to scroll and after clicking a link to open ChildBrowser and then closing it causes MainView to not scroll as if the mainview dimension gets locked in. Any ideas how to resolve this. I tried some of the fixes mentioned above but doesn't work.
https://github.com/apache/incubator-cordova-ios/commit/d8575d7eece28ec2c90de4b448af729accaf2567 added new semantics for screen orientation and broke childbrowser
cc @shazron