Prevent orientation change in iOS Safari

Jonathan Snook has a work around to this problem. In his slides here, he shows how to (sort of) lock to portrait (see slide 54 and 55). The JS code from those slides: window.addEventListener(‘orientationchange’, function () { if (window.orientation == -90) { document.getElementById(‘orient’).className=”orientright”; } if (window.orientation == 90) { document.getElementById(‘orient’).className=”orientleft”; } if (window.orientation == 0) … Read more

iPhone AVFoundation camera orientation

Well, it’s taken me fracking forever but I’ve done it! The bit of code I was looking for is [UIDevice currentDevice].orientation; This goes in as so AVCaptureConnection *videoConnection = [CameraVC connectionWithMediaType:AVMediaTypeVideo fromConnections:[imageCaptureOutput connections]]; if ([videoConnection isVideoOrientationSupported]) { [videoConnection setVideoOrientation:[UIDevice currentDevice].orientation]; } And it works perfectly 😀 Woop woop!

Which activity method is called when orientation changes occur?

Interesting one… Activity is start onResume() is which you declare in your XML by default. And as I found from question answer on stack overflow is: Orientation Change onSaveInstanceState onPause onStop onCreate onStart onRestoreInstanceState onResume Switch TO Activity 2 onSaveInstanceState onPause Orientation Change WHILE IN Activity 2 onStop onCreate onStart Switchback BACK FROM Activity2 onResume … Read more

Horizontal UITableView

I have published sample code that demonstrates one approach for implementing horizontally scrolling table views using transforms. It’s called EasyTableView and provides the same interface for both vertically and horizontally scrolling table views.

On iOS8, displaying my app in landscape mode will hide the status bar but on iOS 7 the status bar is displayed on both orientations

Try this Add below code in didRotateFromInterfaceOrientation [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone]; EDIT NO NEED TO WRITE CODE IN ALL VIEW CONTROLLER Set View controller-based status bar appearance to NO in plist and add below code in root view controller’s viewDidLoad [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone]; [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone]; Demo project https://www.dropbox.com/s/uumneidk4wom5md/demoStatusBar.zip?dl=0

How can I disable landscape orientation?

To disable orientations for a particular View Controller, you should now override supportedInterfaceOrientations and preferredInterfaceOrientationForPresentation. – (UIInterfaceOrientationMask)supportedInterfaceOrientations { // Return a bitmask of supported orientations. If you need more, // use bitwise or (see the commented return). return UIInterfaceOrientationMaskPortrait; // return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown; } – (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { // Return the orientation you’d prefer – … Read more

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