orientation

How to switch the live screen camera icons from portrait to landscape mode in iPhone?

牧云@^-^@ 提交于 2020-01-03 01:51:07
问题 I created a custom camera overlay for the live screen camera view and have imported my own custom icons for the camera, flash and flip buttons. Everything looks good in portrait mode, but when I switch the live camera screen to landscape mode, the orientation of the camera stays in portrait mode and shows this in console, "Error: CGAffineTransformInvert: singular matrix" I tried using the auto resizing mask , also have tried setting two different frames for the icons in both portrait and

Lossless JPEG rotation during decoding with libjpeg

帅比萌擦擦* 提交于 2020-01-03 01:20:13
问题 I've got a simple C++ app that decodes JPEGs with libjpeg - however, some of the images it processes come out sideways! These input images have orientations baked in to the EXIF data by the camera, but it seems that during decompression, libjpeg isn't taking the orientation flag into account as many JPEG viewers do. Is there a way to get libjpeg to respect the orientation of the JPEG during decompression, or will I have to parse out this orientation tag and manually rotate the image? 回答1: the

Is calling updateViewConstraints manually a good idea?

橙三吉。 提交于 2020-01-02 23:13:58
问题 I'm creating my constraints mainly in viewDidLoad . In updateViewConstraints I'm adding or removing some subviews and additionally adding and removing constraints. As a side note I'm using a container with child view controllers and I'm reusing the same view for different orientations (full in landscape, in a popover in portrait). Because I have my complete setup in updateViewConstraints I have to call it in some situations manually to adapt the visual changes and not to brake the constraints

How to lock device orientation in iOS 7 and iOS 8

谁说我不能喝 提交于 2020-01-02 07:19:09
问题 I have a problem with my app. I cannot lock the orientation of my app. All I need to do is to lock one view controller to landscape mode and the rest are portrait. This is hierarchy of my app. *Navigation Controller *TabBarController *ViewControllers 回答1: You only have to return NO from shouldAutorotate and the landscape orientation from supportedInterfaceOrientation in the one you want to be in landscape. On the other, return NO too from shouldAutorotate method and portrait orientations mask

DirectX11 With Windows SDK--18 使用DirectXCollision库进行碰撞检测

痞子三分冷 提交于 2020-01-01 22:07:19
前言 在DirectX SDK中,碰撞检测的相关函数位于xnacollision.h中。但是现在,前面所实现的相关函数都已经转移到Windows SDK的DirectXCollision.h中,并且处于名称空间DirectX内。这里面主要包含了四种包围盒(Bounding Volumes),并且是以类的形式实现的: BoundingSphere类--包围球(Bounding Box) BoundingBox类--轴对齐包围盒(Axis-aligned bounding box),又称AABB盒 BoundingOrientedBox类--有向包围盒(Oriented bounding box),又称OBB盒 BoundingFrustum类--包围视锥体(Bounding Frustum) 除此之外里面还包含有三角形(射线)与其余物体的碰撞检测。 后续的项目将会使用该碰撞库。 DirectX11 With Windows SDK完整目录 Github项目源码 欢迎加入QQ群: 727623616 可以一起探讨DX11,以及有什么问题也可以在这里汇报。 常见包围盒 包围球(Bounding Box) 一个球体只需要使用圆心坐标和半径就可以表示。结构体的一部分如下: struct BoundingSphere { XMFLOAT3 Center; // 球体中心坐标 float

Android camera saving images with wrong orientation

纵饮孤独 提交于 2020-01-01 17:15:50
问题 I have a camera app that uses only the portrait mode (restricted via android manifest file). Following code is my SurfaceView used for the Camera public class CameraPreview extends SurfaceView implements SensorEventListener, SurfaceHolder.Callback { private SurfaceHolder mSurfaceHolder; private Camera mCamera; private Activity mActivity; private static boolean DEBUGGING = true; private static final String LOG_TAG = "CameraPreviewSample"; private static final String CAMERA_PARAM_ORIENTATION =

Android Master Detail Flow - Select first item in list on tablet only

为君一笑 提交于 2020-01-01 15:23:49
问题 I created a new app relying on the default "Master Detail Flow" template, chosen in the "New Project..." dialog of Android Studio. Then I adapted the application to fit my needs and my data. Works like a charm on handhelds and tablets. The only thing I want to achive ist to autoselect the first item in the list, showing the detail view and setting the list item as selected. In the "ItemListFragment" I called the "onListItemClick(...)" method in the overwritten "onStart()" method. This had

Android Master Detail Flow - Select first item in list on tablet only

一曲冷凌霜 提交于 2020-01-01 15:23:29
问题 I created a new app relying on the default "Master Detail Flow" template, chosen in the "New Project..." dialog of Android Studio. Then I adapted the application to fit my needs and my data. Works like a charm on handhelds and tablets. The only thing I want to achive ist to autoselect the first item in the list, showing the detail view and setting the list item as selected. In the "ItemListFragment" I called the "onListItemClick(...)" method in the overwritten "onStart()" method. This had

Remove ability for portrait orientation for app in iPhone SDK

百般思念 提交于 2020-01-01 12:13:14
问题 Is there a way where I can only allow my app viewable in landscape mode? I've managed to default the application's orientation to landscape, however in the iPad simulator, when I do Command->Arrow, the application rotates to portrait. I've removed the listings in the plist under "Supported interface orientations" for both of the Portrait entries, however that doesn't seem to've changed anything. Any idea? 回答1: In your view controller, there's a delegate method for this: - (BOOL

Prevent Live Wallpaper orientation change when an application is opened and orientation is changed?

自闭症网瘾萝莉.ら 提交于 2020-01-01 08:28:09
问题 I'm having an orientation issue with a Live Wallpaper that I wrote. Basically the canvas will rotate depending on the application opened above it. I tested this and realized that the onSurfaceChanged() method is firing when I return to the home screen from a previously opened application who's orientation was changed. I suppose a better question would be, why does my Live Wallpaper Surface Change when an application is opened and it's orientation changed? Is there a way to prevent my Live