I solved these problems in my Big 5 app. I created a private group on
Google Groups and I will try to release the code within the next hours
there. To get updated you might want to enter this private group:
http://groups.google.de/group/big5apps
For more informations about this project go here:
Dirk
Code Generator schrieb:
#import "GlassViewController.h"#import "GlassAppDelegate.h"@implementation GlassViewController// Subclasses override this method to define how the view they control will respond to device rotation
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {return YES;}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {//UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait,//UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,//UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight,//UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeftdouble i = 0;NSString * jsCallBack = nil;NSString * ret = nil;switch (toInterfaceOrientation){case UIInterfaceOrientationPortrait:NSLog(@"UIInterfaceOrientationPortrait");i = 0;break;case UIInterfaceOrientationPortraitUpsideDown:NSLog(@"UIInterfaceOrientationPortraitUpsideDown");i = 180;break;case UIInterfaceOrientationLandscapeLeft:NSLog(@"UIInterfaceOrientationLandscapeLeft");i = 90;break;case UIInterfaceOrientationLandscapeRight:NSLog(@"UIInterfaceOrientationLandscapeRight");i = -90;break;default:NSLog(@"default");}NSLog(@"%f",duration);GlassAppDelegate *appDelegate = (GlassAppDelegate*)[[UIApplication sharedApplication] delegate];jsCallBack = [[NSString alloc] initWithFormat:@"window.orientation = %f;window.onorientationchange();", i];ret = [appDelegate.webView jsCallBack];NSLog(jsCallBack);NSLog(ret);}- (IBAction)loadView {
}- (IBAction)pushBack {
}- (IBAction)pushHome {
}@end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to phonegap+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/phonegap?hl=en
-~----------~----~----~----~------~----~------~--~---