Ver código fonte

Fix UIActivityIndicatorViewStyle deprecation messages

master
lint 3 anos atrás
pai
commit
c67a2a5d58
1 arquivos alterados com 2 adições e 5 exclusões
  1. +2
    -5
      prefs/TFDTSRootListController.m

+ 2
- 5
prefs/TFDTSRootListController.m Ver arquivo

@@ -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];

Carregando…
Cancelar
Salvar