iPhone – UIWindow rotating depending on current orientation?

You need to roll your own for UIWindow. Listen for UIApplicationDidChangeStatusBarFrameNotification notifications, and then set the the transform when the status bar changes. You can read the current orientation from -[UIApplication statusBarOrientation], and calculate the transform like this: #define DegreesToRadians(degrees) (degrees * M_PI / 180) – (CGAffineTransform)transformForOrientation:(UIInterfaceOrientation)orientation { switch (orientation) { case UIInterfaceOrientationLandscapeLeft: return CGAffineTransformMakeRotation(-DegreesToRadians(90)); … Read more

iphone/ipad orientation handling

I do this with two simple methods in my view controller: – (void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { [self adjustViewsForOrientation:toInterfaceOrientation]; } – (void) adjustViewsForOrientation:(UIInterfaceOrientation)orientation { if (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight) { titleImageView.center = CGPointMake(235.0f, 42.0f); subtitleImageView.center = CGPointMake(355.0f, 70.0f); … } else if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) { titleImageView.center = CGPointMake(160.0f, … Read more

PhoneGap – Forcing Landscape orientation

Have you tried this? android:screenOrientation=”portrait” Inside the AndroidManifest.xml file, where you have declared your activity, just add the above line. For example: <activity android:name=”.Activity.SplashScreenActivity” android:label=”@string/app_name” android:screenOrientation=”portrait”> <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.LAUNCHER” /> </intent-filter> </activity>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)