How to support landscape orientation for only single scene in Storyboard IOS 6.0 & 7.0? - ios6

Hi am using storyboard to design UI my entire application.It will support Portrait mode for all screen except reports screen.In Reports i have to show huge data so it should be in landscape mode.And also using tabbar controler.
My Question is 1. :is there any possible to support different orientation in storyboard?
P.S: i have tried to rotate view to landscape mode its working fine but am unable to hide tab bar and status bar in my application for particular screen.
2.It possible to handle orientation programatically for all scene?(to support portrait/landscape)
P.S: I have changed my plist to support landscape left/right.But it roating to landscape for all screen.i tried below code for my landscape but its not woking .
-(BOOL)shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskLandscape;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationMaskLandscape;
}
Please guide me.thanks in avance

Related

Question about widget landscape and portrait

I need to use my menu with image in landscape and portrat (if user turns the phone to another position) using widget.
I need for landscape and portrait with different widget design, or exists other better solution (like works responsive html)?
You can design your widgets for multiple resolutions using the canvas scaling (see here) or by creating dedicated widgets for landscape and portrait. To determine which to show, simply compare the Screen width and height (see here). If width > height, show the landscape and portrait elsewise.

A way to detect mouseenter vs touch click? How about using Modernizr?

I need to find a way to know if a user has used mouse hover or touch click to show and hide different menu links. What I want to do is this.
if(a user used a mouseenter or mouseleave){
$("li.mobile-show > a").hide();
$("div.hover-over").hover(function(){
$(".hover-dropdown", this).children().slideToggle();
});
}
else if(a user used touch click){
$("li.mobile-show > a").show();
$("div.hover-over").click(function(){
$(".hover-dropdown", this).children().toggle();
});
}
I tried Modernizr.mq('only all and (min-width: 768px)') to see if I can separate the table & mobile device vs computer screen, but it didn't work for large tablet devices that show the desktop view but only can use the touch feature. Help~!
It's an old trouble. Unfortunately there is no way. Not with Modernizr, not with anything.
Desktop browsers (at least major ones) has ontouchstart ('ontouchstart' in window) and whole Touch Events API.
Mobile browsers emulates mouse events.
making conclusions based on device width/dimensions is also prone to errors: many tablets has 1280, 1300 and more pixels width

WPF detect reverse landscape orientation

I knew how to detect general orientations, such as Portrait or Landscape, but is there a way to know if current orientation is Left-Portrait or Right-Portrait, Landscape or Reverse Landscape?
I need to know about the reverse orientation because in my video recording app, the live preview window looked weird when the device was rotated.
To get the exact orientation, you can listen to the DisplaySettingsChanged event as mentioned in your link. Then you can retrieve the System.Windows.Forms.SystemInformation.ScreenOrientation enum parameter. It can have one of the following values:
Angle0
Angle90
Angle180
Angle270
Te be able to use this in WPF, you'll need to add a reference to System.Windows.Forms.
private int GetOrientation()
{
return ((int) System.Windows.Forms.SystemInformation) * 90;
}

How to resolve the orientation of ImagePicker control view in landscape mode and whole application in portrait mode?

What I want is my whole application is in portrait mode only.
And it working fine in ios 6+. The only support required at now.
But the problem is I need to launch UIImagePickerViewController with image source type camera in only landscape mode.
What I tried till now is:
(1) I try to create one category for UIImagePickerController for orientation.
-(BOOL)shouldAutorotate
{
return NO;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeLeft;
}
Like this. But the camera view is not proper aligned. It just follows the orientation of device with some +/- 90 angle but not what I required.
Even the button of the camera shown by camera view as camera control is also follows the camera view, ie. the view is rotated to 90 anti clock vise and stays to that way.
I use the below code to present the image picker view controller
[self presentViewController:imagePicker animated:YES completion:nil];
Is there any way to use the camera with proper alignment? or have to use other framework to work with it?

Detecting Orientation of Windows Phone

I'm using the JavaScript event onorientationchange and the parameter window.orientation to detect orientation changes and orientation values on my website. This works well with an iPhone and an Android. But a Windows Phone doesn't fire the onorientationchange event and window.orientation is undefined.
How I detect orientation changes of Windows Phones?
Thanks, Konrad
IE9Mobile doesn't support these events.
If your page is being displayed inside a WebBrowser control within a (silverlight) app then you can detect the orientation change at app level and then invoke scripts on the page to pass this information.
If you're just running in the browser then there is no way to detect orientation changes.
In CSS3 (works well with Mango, I don't know if in classic IE9 Mobile, but probably):
#media screen and (max-width: 480px)
{
/* CSS for Orientation Vertical */
}
#media screen and (min-width: 481px)
{
/* CSS for Orientation Horizontal */
}
Let me know if it worked!
The CSS change is perhaps the best way to detect orientation changes but, if you're like me, and just need a quick and dirty way to find out the current orientation then this'll do the job.
var isLandscape = $(window).width() > $(window).height();
For what it's worth, it seems like the implementation of window.orientation differs on certain platforms so you may need to check what device is being used.

Resources