FSDebugBanner
调试横幅位于视图的右上角。
要求
- iOS8.0+
安装
FSDebugBanner 通过 CocoaPods 可用。要安装它,只需在 Podfile 中添加以下行:
pod 'FSDebugBanner'
用法
Objective-C
@import FSDebugBanner;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[self.window addSubview:[[FSDebugBannerView alloc] initWithText:@"DEBUG"]];
return YES;
}
swift
import FSDebugBanner
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window?.addSubview(FSDebugBannerView(text: "DEBUG"))
return true
}
作者
xsfish
许可
FSDebugBanner 以 MIT 许可证提供。更多相关信息请参阅 LICENSE 文件。