TwentyFourHours 是一个用于全天候运行的应用程序的库,例如公共显示屏。它允许您指定应用何时允许进入空闲状态以及何时不允许。
以至于版本 0.0.1,您可以指定:
在星期日,应用程序总是被允许进入空闲状态
pod 'TwentyFourSeven'
将设置面板添加到现有的 Settings.bundle 的 Root.plist。
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>Shop Hours</string>
<key>File</key>
<string>ShopHours</string>
</dict>
在您的 AppDelegate.m 文件
#import "AppDelegate.h"
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[TwentyFourSeven sharedInstance];
}
@end
在您的 AppDelegate.h 文件
#import "TwentyFourSeven-Swift.h"