Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我在 Xcode 中按下按钮时,我希望同时获得加速度计界面和 GPS 的值。
我现在知道单例概念,但我不知道如何通过按一个按钮来启动加速度计和 GPS。
答案是添加所需的接口,如下所示:
@interface OverlayViewController : UIViewController <UINavigationControllerDelegate, UIImagePickerControllerDelegate, CLLocationManagerDelegate>