浏览代码

Fix UIActivityIndicatorViewStyle deprecation messages

master
lint 3 年前
父节点
当前提交
c67a2a5d58
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. +2
    -5
      prefs/TFDTSRootListController.m

+ 2
- 5
prefs/TFDTSRootListController.m 查看文件

@@ -48,11 +48,8 @@

cell.userInteractionEnabled = NO;

UIActivityIndicatorView *activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];

if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"13.0")) {
activityView.activityIndicatorViewStyle = UIScreen.mainScreen.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark ? UIActivityIndicatorViewStyleWhite : UIActivityIndicatorViewStyleGray;
}
NSInteger activityIndicatorStyle = SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"13.0") ? UIActivityIndicatorViewStyleMedium : 2; // UIActivityIndicatorViewStyleGray == 2
UIActivityIndicatorView *activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:activityIndicatorStyle];

[cell setAccessoryView:activityView];
[activityView startAnimating];

正在加载...
取消
保存