orientation

iPhone Landscape FAQ and Solutions

删除回忆录丶 提交于 2019-12-27 12:54:06
问题 There has been a lot of confusion and a set of corresponding set of questions here on SO how iPhone applications with proper handling for Landscape/Portrait mode autorotation can be implemented. It is especially difficult to implement such an application when starting in landscape mode is desired. The most common observed effect are scrambled layouts and areas of the screen where touches are no longer recognized. A simple search for questions tagged iphone and landscape reveals these issues,

解决ios手机上传竖拍照片旋转90度问题

ぃ、小莉子 提交于 2019-12-26 19:48:40
html5+canvas进行移动端手机照片上传时,发现ios手机上传竖拍照片会逆时针旋转90度,横拍照片无此问题;Android手机没这个问题。 因此解决这个问题的思路是:获取到照片拍摄的方向角,对非横拍的ios照片进行角度旋转修正。 这里主要利用 exif.js 读取照片的拍摄信息。 Exif.js 提供了 JavaScript 读取图像的原始数据的功能扩展,例如:拍照方向、相机设备型号、拍摄时间、ISO 感光度、GPS 地理位置等数据。 EXIF 数据主要来自拍摄的照片,多用于移动端开发,PC 端也会用到,此插件兼容主流浏览器,IE10 以下不支持。 这里主要 用到 Orientation 属性。 Orientation 属性说明如下: 在页面中首先引入 exif.js 主要代码如下: //获取照片的元信息(拍摄方向) function getPhotoOrientation(img) { var orient; EXIF.getData(img, function() { orient = EXIF.getTag(this, "Orientation"); }); return orient; } //获取照片的拍摄方向 var orient = getPhotoOrientation(image); //判断图片拍摄方向是否旋转了90度 if (orient == 6) {

launching a modal view controller to work around the orientation “lock” of tab bar and nav VCs?

一世执手 提交于 2019-12-25 18:28:27
问题 I have an iPhone app with a root view controller (VC) of UITabBarController (set to portrait orientation) with several tabs, one of which is a simple UIViewController. In that UIViewController is a single button - "Play Video", which, when clicked opens a modal view of the video (and automatically starts playing the video). The video view is a UIWebView in a UIViewController. I've been trying to get the Web View's VC to change orientation to landscape but have not had any luck. I've looked

Orientation Portrait and PortraitUpSideDown Only For One Window

偶尔善良 提交于 2019-12-25 08:31:51
问题 I have 10 windows. The initial window is loginWindow i want to set orientation for Portrait and PortraitUpSideDown. For remaining windows will have landscape and portrait orientation. in Tiapp.xml <key>UISupportedInterfaceOrientations~iphone</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> Which set all

Swift TableViewController is in Landscape

南笙酒味 提交于 2019-12-25 03:26:37
问题 I have a tableViewController that when a row is tapped on goes to a url using a KINWebBrowserViewController. The tableViewController should only be in portrait but the KINWebBrowserViewController can be landscape or portrait. When I go back to the tableViewController in landscape the tableViewController is also in landscape. How can I stop this? The code for orientation: class CustomNC: UINavigationController { override func supportedInterfaceOrientations() -> Int { if visibleViewController

How to rotate only the subclassed mpmovieplayer controller and keeping other views fixed to portrait

一笑奈何 提交于 2019-12-25 03:24:56
问题 I am using xcdYoutubeVideoViewController which is subclassed from MPMoviePlayerController. My application is in portrait. To launch the movieplayer, I am doing this: UINavigationController *navBarController = (UINavigationController*)[[[UIApplication sharedApplication] keyWindow] rootViewController] ; [navBarController presentMoviePlayerViewControllerAnimated:vc]; where vc is instance of XCDYouTubeVideoPlayerViewController. How can I allow rotation only in this view and on pressing done

How do I code for the landscape orientation in iPhone?

拜拜、爱过 提交于 2019-12-25 02:48:06
问题 I understand that I can change what interface orientations are supported, but if I want the landscape view to be entirely different, or somewhat different than the portrait view, how do I code for it? Thank you. 回答1: Just load another view controller when the orientation changes. To make things simple, I often use a hidden navigation controller and push and pop the views I want for any particular orientation. 回答2: Using a dedicated view controller for each orientation is the easiest approach.

1.6 to 2.1 CameraInfo alternative?

耗尽温柔 提交于 2019-12-25 02:22:27
问题 android.Camera.Preferences.setRotation documentation public void onOrientationChanged(int orientation) { if (orientation == ORIENTATION_UNKNOWN) return; android.hardware.Camera.CameraInfo info = new android.hardware.Camera.CameraInfo(); android.hardware.Camera.getCameraInfo(cameraId, info); orientation = (orientation + 45) / 90 * 90; int rotation = 0; if (info.facing == CameraInfo.CAMERA_FACING_FRONT) { rotation = (info.orientation - orientation + 360) % 360; } else { // back-facing camera

iPad app interface orientation changed after launch of aplicaiton

☆樱花仙子☆ 提交于 2019-12-25 01:55:49
问题 i am working on app. the orientation of app is landscape but after app run interface orientation of app change the interface and rotate. splash screen display in correct way (landscape). i am using ios7 the app was code for ios5 i think there is some deprecated api issue e.g. shouldAutorotateToInterfaceOrientation bot called because this is no more available in latest ios 回答1: If you want all of our navigation controllers to respect the top view controller you can use a category so you don't

Locking Interface Orientation?

六月ゝ 毕业季﹏ 提交于 2019-12-25 00:14:31
问题 On the initial view of my app I want the interface to be portrait only but on the view controllers after that it can be any orientation. I tried this code to lock it but it doesn't work and the view can still rotate: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); } 回答1: The reason that code is not working is most likely because you are running iOS 6. Try this code instead: - (BOOL