在调用UIImagePickerController出现这个错误的解决办法:
Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'
在Info.plist里需要设置程序支持Portrait,同时编写一个继承类继承UIImagePickerController。
@interface NonRotatingUIImagePickerController : UIImagePickerController @end @implementation NonRotatingUIImagePickerController - (BOOL) shouldAutorotate { return YES; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return UIInterfaceOrientationIsLandscape( interfaceOrientation ); } - (NSUInteger) supportedInterfaceOrientations{ #ifdef __IPHONE_6_0 return UIInterfaceOrientationMaskAllButUpsideDown; //return UIInterfaceOrientationMaskLandscape; #endif } @end
原因是UIImagePickerController默认是竖屏,所以程序需要支持竖屏,然后通过自定义的controller来支持具体的屏幕类型。
相关推荐
At present, cable supported bridges are enabled for spans in the range from 200 m to 2000 m (and beyond), thus covering approximately 90 per cent of the present span range. For the vast majority of ...
You will explore the Qt Designer, discover the different types of widgets generally used in Qt 5, and then connect your application to the database to perform dynamic operations. Next, you will be ...
Starting with iOS 7, Apple has added native features for building apps that scan, display, and print barcodes, eliminating the need for third-party libraries. About the Book Barcodes with iOS ...
The library has been tested on NT4 service pack 5 and Windows 2000. Windows 95, 98, ME and XP should be supported, but has not been tested. Linux and Kylix are not supported. There are *NO* plans to ...
Readers will learn how to test the application for the localization support and how to avoid common pitfalls. Using Xamarin.Forms and Visual Studio, the app will be implemented for Android, iOS, and ...
Since then he has supported his brother David in refining and expanding the scope of this popular linear algebra text, including writing most of Chapters 8 and 9. Steven is also the author of three ...
Enhance Your Delphi Application with Drop-in Shell Functionality •Includes 18 visual and non-visual components •Create Explorer-like applications within minutes with JamShellTree, the JamShellList ...
This second edition has been updated with new screenshots and detailed steps to provide you with a holistic overview of the new features incorporated in Xamarin 3. By the end of the book, you will ...
The Scientist and Engineer Guide to Digital Signal Processing——Second Edition by Steven W. Smith This book was written for scientists and engineers in a wide variety of fields: physics, ...
The simpler and more robust programming model that is supported by WDF makes the transition from application developer to driver developer much easier than with WDM. In particular, WDF provides ...
The information I’m dealing with has to be accessible on a number of different platforms. In my home office alone, I’ve got Macs, Unix, Linux, at least five different versions of Win- dows, and ...
If you are a consumer and hobbyist who has familiarity with the basics of Arduino and wish to learn computer vision programming with Arduino to create intelligent systems, then this book is for you....
transport-layer segment: generated by the transport layer and encapsulates application-layer message with transport layer header; network-layer datagram: encapsulates transport-layer segment with a ...
No matter what your specific background as a Java developer, whether you're simply interested in building up a safety net to reduce regressions of your desktop application or in improving your server-...
Concepts in the book are supported with use cases, and emphasis is put on the reality that most of you are implementing in a “brownfield” environment in which you must implement microservices ...
It then moves on to covering data definition language (DDL) with emphasis on PostgreSQL and common DDL commands supported by ANSI SQL. You will then learn the data manipulation language (DML), and ...
- Minor changes to the No operation error watchdog timer for the CD and Hard disk tests. - Minor correction to the Butterfly seek test. - Video playback trace logging increased. Release 5.3 build ...
The book covers everything from simple to enterprise-class deployments, with emphasis on enterprise-level requirements and coverage of cloud and hybrid-cloud scenarios. Many books cover how to ...
In the chapters that follow, some familiarity with IP addressing and TCP Ports is assumed, but an overview of these topics is provided in Appendix A. General guidelines are given for the whole process...