landscape

Creating Landscape and Portrait layout using HTML and CSS

别来无恙 提交于 2019-12-05 02:59:24
问题 I have got a requirement where I need to write a HTML/CSS, which should display Landscape and Portrait, depending upon the orientation of the iPad, that is initially I want to write this using HTML and CSS and then later use it for the iPad developement. My question is what is the best way to achieve this? Does it make sense to have two different html/css files and load them depending on the orientation of the device or is there any other way to implement this. Any information regarding this

How do I make an HTML page print in landscape when the user selects 'print'?

萝らか妹 提交于 2019-12-04 20:09:55
问题 We generate web pages that should always be printed in landscape mode. Web browser print dialogs default to portrait, so for every print job the user has to manually select landscape. It's minor, but would be nice for the user if we can remove this unnecessary step. Thanks in advance to all respondents. 回答1: A quick Google indicates that it's not really supported. There's more than a few folks out there trying to hack their way to it - but I'd strongly suggest just rendering a server side PDF

UIScrollViews subviews not resizing themselves on Portrait to Landscape Orientation Change

末鹿安然 提交于 2019-12-04 19:41:35
In my app, I have a hierarchy like Main view -> UIScrollView - > UISearchBar. The search bar covers the whole width of screen. But when it switches to landscape the scrollview adjust itself according to landscape and cover whole screen but its subviews like UISearchBar width remain same as in portrait. Plus I'm using Autolayout and I've correctly set their constraints (Leading and Trailing, width (greater than equal to 320) etc) in storyboard. Also I know there are several answers for this in SO but almost everyone is saying set width again in willAutororate. But I have around 15 subviews in

Printing landscape html->pdf using abcPDF

社会主义新天地 提交于 2019-12-04 15:12:37
I am trying to get a PDF generated by abcPDF from html output to print the first three pages in portrait and then switch the fourth page to landscape. I have been able to get the html to switch into landscape for the fourth page by applying this class to a div that is the 4th page: .PageLandscape { width="100%"; height="100%"; filter: progid:DXImageTransform.Microsoft.BasicImage(Rotation=3); size:landscape; } When abcPDF converts the html to pdf though, the 4th page is still portait. Any thoughts or hints? thanks! Not sure if you've found the answer, but here's how I did it. Found it from

Landscape only iPhone app with multiple nibs

梦想的初衷 提交于 2019-12-04 12:15:58
问题 I'm developing an iPhone application that has several nibs, and should be landscape only. The application is set to start in landscape mode via its Info.plist file. I have two view controllers: FirstViewController and SecondViewController . For each of these I have a nib file, where the view is in landscape. Both view controllers are added to my MainView nib as outlets, and their views are lazily initialized. When the application loads, the first view displays in landscape, as expected.

UIImagePickerController (using camera as source) does autorotate on iPad2, how do i stop it?

筅森魡賤 提交于 2019-12-04 11:46:19
I am trying to write an app with some camera function, and I use an overlay view to decorate it with an image. This is how I implement the app: I use the UIImagePickerController to who the user what the camera takes in, and add a UIImageView onto the cameraOverlayView as a subview so that it works like this: (image at http://www.manna-soft.com/test/uploads/UIImagePickerView-portrait.jpg ) This works fine until the iPad2 come into place... it autorotates like this and ruin the layout: (image at http://www.manna-soft.com/test/uploads/UIImagePickerView-landscape.jpg ) The UIImagePickerController

How to print HTML in landscape?

≯℡__Kan透↙ 提交于 2019-12-04 11:40:22
问题 This question has been asked, and answered, but the heavily upvoted accepted answer both: doesn't explain how to do it does not work The reason, of course, is that the accepted answer 1 is deprecated 2 . And the W3C has not come up with any standard replacement. Which leaves me with a problem, as I have actual things that need to get done. How to tell browsers to print content in landscape? Example that doesn't work I threw together an example that contains every snippet of chewing gum that i

IOS6 landscape playing embedded youtube video from a uiwebview within an only portrait iPhone app

≯℡__Kan透↙ 提交于 2019-12-04 10:55:38
问题 I've got an iPhone application with a storyboard,few xib and custom cells. The application is set as a "portrait" as "supported interface orientation" (i mean everything is display like that). In my custom cells, there is Uiwebview that is linked to a youtube embedded video, when i clicked it the video start to playing, but my problem is that they are always playing in "portrait" mode. I've read lots of things that solve this problem but only in ios5. Actually : I can identify when the video

Android (ActionBarSherlock) Is there any way to keep the same ActionBar height both in portrait and landscape?

本秂侑毒 提交于 2019-12-04 10:35:33
问题 I have been working with the ActionBar and ActionBarSherlock for the last few days, and i am having some issues when filling some information in the ActionBar. When the application runs in portrait mode, the ActionBar looks fine, and all the data can be displayed, for example: But when i switch the app to be displayed in landscape, some of the data is cropped: You can notice how both the status icon and the email has been cropped due to the new height of the ActionBar. In this case, i want to

Iphone Landscape mode switching to Portraite mode on loading new controller

允我心安 提交于 2019-12-04 09:30:41
My app launches in landscape mode correctly and works great: - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if(interfaceOrientation == UIInterfaceOrientationPortrait) return NO; if(interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft ) return YES; return (interfaceOrientation == UIInterfaceOrientationPortrait); } And updated Info.plist with UIInterfaceOrientation = UIInterfaceOrientationLandscapeRight Now in my main controller I switch out one ViewController for another