Simulator just like our childhood dream, when running the application on it, everything is always so beautiful, and the real machine test as our chaotic and the real world, you will encounter all kinds of villain and animal, often suffer inexplicable setbacks. In the face of setbacks, some people to meet the difficult, or not to pick, go their own way;
In the face of the camera flip problem, some people will choose to escape. Why I do not like some of the current programmers, because these people will only escape and create problems, encounter problems is not to find a solution, but to sit there and shout dad dozens. Although not all problems can be solved, but there are many problems can be solved, and these people are always impatient, unwilling to calm down to think.
N+6 years ago I read a good book, called "method is more than problems," holding this mind, I think the camera flip problem can be solved.
Usually, we rarely call the front-facing camera, and most often we use a rear-facing camera. Of course, the solution is similar, so, in order to be easy to understand, this article I will put the camera as an example, to share my solution, if you have a better way, you might as well let the guys together for reference.
Generally speaking, the camera on the real machine is in line with the mobile phone when the angle of the same, that is 90 degrees (mobile phone counterclockwise rotation).
In other words, when the phone rotates counterclockwise 90 degrees, the direction of the machine and the camera consistent. In this case, if we can do one thing, we can solve the problem of the camera flipping.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/