Snapshooter可以通过CocoaPods获得。要安装它,只需将以下行添加到您的Podfile中
pod "Snapshooter"
只需从AppDelegate的application:didFinishLaunchingWithOptions:
方法调用[Snapshooter enableWithProperties:...]
即可。如果您的应用程序支持横屏模式,请实现[Snapshooter supportedInterfaceOrientationsForWindow:...]
#import "Snapshooter.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Snapshooter enableWithProperties:@{}];
}
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
return [Snapshooter supportedInterfaceOrientationsForWindow:window];
}
Seiya Shimokawa, [email protected]
Snapshooter可在MIT许可证下使用。更多信息请参阅LICENSE文件。