GitHub地址:KJEmitterView
更新到iOS 13.1.2之后系统开启暗黑模式
App背景和文字相对应的做出了反转
禁用App暗黑模式
快速解决无主题的App问题
在info.plist当中新增如下键值对
<key>UIUserInterfaceStyle</key>
<string>Light</string>
WX20191010-155217@2x.png
iOS13以后 presentViewController 过去的控制器可以滑动和顶部少一截问题
解决方案:
写一个UIViewController的扩展
//
// UIViewController+KJFullScreen.m
// Winpower
//
// Created by 杨科军 on 2019/10/10.
// Copyright © 2019 cq. All rights reserved.
//
#import "UIViewController+KJFullScreen.h"
@implementation UIViewController (KJFullScreen)
+ (void)load{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
SEL originalSelector = @selector(presentViewController:animated:completion:);
SEL swizzledSelector = @selector(kj_presentViewController:animated:completion:);
Class class = [self class];
Method originalMethod = class_getInstanceMethod(class, originalSelector);
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
if (class_addMethod(class, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod))) {
class_replaceMethod(class, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod));
} else {
method_exchangeImplementations(originalMethod, swizzledMethod);
}
});
}
- (void)kj_presentViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))completion{
/// presented VC充满全屏
vc.modalPresentationStyle = UIModalPresentationFullScreen;
[self kj_presentViewController:vc animated:animated completion:completion];
}
@end
网友评论