simulates ios 12
This commit is contained in:
1 parent
68f21fa8e5
commit
a64a29ce07
13 files changed
+42
-42
No files matched your search
+10
-10
@@ -187,7 +187,7 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
self.hostIconView = [[UIImageView alloc] init];
|
self.hostIconView = [[UIImageView alloc] init];
|
||||||
self.hostIconView.translatesAutoresizingMaskIntoConstraints = NO;
|
self.hostIconView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||||
self.hostIconView.contentMode = UIViewContentModeScaleAspectFit;
|
self.hostIconView.contentMode = UIViewContentModeScaleAspectFit;
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
self.hostIconView.image = [UIImage systemImageNamed:@"display"];
|
self.hostIconView.image = [UIImage systemImageNamed:@"display"];
|
||||||
} else {
|
} else {
|
||||||
self.hostIconView.image = [UIImage imageNamed:@"Computer"];
|
self.hostIconView.image = [UIImage imageNamed:@"Computer"];
|
||||||
@@ -225,7 +225,7 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
// lockIcon
|
// lockIcon
|
||||||
lockIconView =[[UIImageView alloc] init];
|
lockIconView =[[UIImageView alloc] init];
|
||||||
lockIconView.translatesAutoresizingMaskIntoConstraints = NO;
|
lockIconView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
lockIconView.image = [UIImage systemImageNamed:@"lock.fill"];
|
lockIconView.image = [UIImage systemImageNamed:@"lock.fill"];
|
||||||
} else {
|
} else {
|
||||||
// lockIconView.image = [UIImage imageNamed:@"Computer"];
|
// lockIconView.image = [UIImage imageNamed:@"Computer"];
|
||||||
@@ -308,7 +308,7 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
self.launchButton.tintColor = [UIColor whiteColor];
|
self.launchButton.tintColor = [UIColor whiteColor];
|
||||||
[self.launchButton addTarget:self action:@selector(launchButtonTapped) forControlEvents:UIControlEventPrimaryActionTriggered];
|
[self.launchButton addTarget:self action:@selector(launchButtonTapped) forControlEvents:UIControlEventPrimaryActionTriggered];
|
||||||
[self addSubview:self.launchButton];
|
[self addSubview:self.launchButton];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:self.launchButton.frame.size.height*_sizeFactor];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:self.launchButton.frame.size.height*_sizeFactor];
|
||||||
[self.launchButton setImage:[UIImage systemImageNamed:@"play.fill" withConfiguration:config] forState:UIControlStateNormal];
|
[self.launchButton setImage:[UIImage systemImageNamed:@"play.fill" withConfiguration:config] forState:UIControlStateNormal];
|
||||||
|
|
||||||
@@ -334,7 +334,7 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
[self.pairButton setTitle:[LocalizationHelper localizedStringForKey:@" Pair with PIN"] forState:UIControlStateNormal];
|
[self.pairButton setTitle:[LocalizationHelper localizedStringForKey:@" Pair with PIN"] forState:UIControlStateNormal];
|
||||||
[self.pairButton setTitleColor:defaultBlue forState:UIControlStateNormal]; // theme
|
[self.pairButton setTitleColor:defaultBlue forState:UIControlStateNormal]; // theme
|
||||||
self.pairButton.titleLabel.font = [UIFont boldSystemFontOfSize:16*_sizeFactor];
|
self.pairButton.titleLabel.font = [UIFont boldSystemFontOfSize:16*_sizeFactor];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:self.pairButton.frame.size.height/3.5*_sizeFactor weight:UIImageSymbolWeightBold];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:self.pairButton.frame.size.height/3.5*_sizeFactor weight:UIImageSymbolWeightBold];
|
||||||
UIImage *templateImage = [UIImage systemImageNamed:@"lock.open.fill" withConfiguration:config];
|
UIImage *templateImage = [UIImage systemImageNamed:@"lock.open.fill" withConfiguration:config];
|
||||||
UIImage *coloredImage = [templateImage imageWithTintColor:defaultBlue renderingMode:UIImageRenderingModeAlwaysOriginal];
|
UIImage *coloredImage = [templateImage imageWithTintColor:defaultBlue renderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||||
@@ -475,7 +475,7 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
|
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
|
||||||
[super traitCollectionDidChange:previousTraitCollection];
|
[super traitCollectionDidChange:previousTraitCollection];
|
||||||
|
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
if ([self.traitCollection hasDifferentColorAppearanceComparedToTraitCollection:previousTraitCollection]) {
|
if ([self.traitCollection hasDifferentColorAppearanceComparedToTraitCollection:previousTraitCollection]) {
|
||||||
[self updateTheme:self.traitCollection.userInterfaceStyle];
|
[self updateTheme:self.traitCollection.userInterfaceStyle];
|
||||||
}
|
}
|
||||||
@@ -522,7 +522,7 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
_wakeupButton.hidden = YES;
|
_wakeupButton.hidden = YES;
|
||||||
|
|
||||||
[_appButton setTitleColor:defaultBlue forState:UIControlStateNormal]; // theme
|
[_appButton setTitleColor:defaultBlue forState:UIControlStateNormal]; // theme
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:self.launchButton.frame.size.height/4*_sizeFactor];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:self.launchButton.frame.size.height/4*_sizeFactor];
|
||||||
[self.launchButton setImage:[UIImage systemImageNamed:@"play.fill" withConfiguration:config] forState:UIControlStateNormal];
|
[self.launchButton setImage:[UIImage systemImageNamed:@"play.fill" withConfiguration:config] forState:UIControlStateNormal];
|
||||||
} else {
|
} else {
|
||||||
@@ -547,7 +547,7 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
_statusLabel.textColor = [ThemeManager textColorGray];
|
_statusLabel.textColor = [ThemeManager textColorGray];
|
||||||
_statusLabel.text = @"Offline";
|
_statusLabel.text = @"Offline";
|
||||||
_statusIcon.tintColor = [ThemeManager textColorGray];
|
_statusIcon.tintColor = [ThemeManager textColorGray];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
_statusIcon.image = [UIImage systemImageNamed:@"exclamationmark.triangle.fill"];
|
_statusIcon.image = [UIImage systemImageNamed:@"exclamationmark.triangle.fill"];
|
||||||
} else {
|
} else {
|
||||||
// Fallback on earlier versions
|
// Fallback on earlier versions
|
||||||
@@ -559,7 +559,7 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
_pairButton.hidden = YES;
|
_pairButton.hidden = YES;
|
||||||
_wakeupButton.hidden = NO;
|
_wakeupButton.hidden = NO;
|
||||||
|
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:self.wakeupButton.frame.size.height/3.2*_sizeFactor weight:UIImageSymbolWeightBold];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:self.wakeupButton.frame.size.height/3.2*_sizeFactor weight:UIImageSymbolWeightBold];
|
||||||
UIImage *templateImage = [UIImage systemImageNamed:@"power" withConfiguration:config];
|
UIImage *templateImage = [UIImage systemImageNamed:@"power" withConfiguration:config];
|
||||||
UIImage *coloredImage = [templateImage imageWithTintColor:defaultBlue renderingMode:UIImageRenderingModeAlwaysOriginal];
|
UIImage *coloredImage = [templateImage imageWithTintColor:defaultBlue renderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||||
@@ -579,7 +579,7 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
_statusLabel.textColor = [ThemeManager textColorGray];
|
_statusLabel.textColor = [ThemeManager textColorGray];
|
||||||
_statusLabel.text = @"Detecting...";
|
_statusLabel.text = @"Detecting...";
|
||||||
_statusIcon.tintColor = [ThemeManager textColorGray];
|
_statusIcon.tintColor = [ThemeManager textColorGray];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
_statusIcon.image = [UIImage systemImageNamed:@"antenna.radiowaves.left.and.right"];
|
_statusIcon.image = [UIImage systemImageNamed:@"antenna.radiowaves.left.and.right"];
|
||||||
} else {
|
} else {
|
||||||
// Fallback on earlier versions
|
// Fallback on earlier versions
|
||||||
@@ -593,7 +593,7 @@ static const float REFRESH_CYCLE = 2.0f;
|
|||||||
_wakeupButton.hidden = NO;
|
_wakeupButton.hidden = NO;
|
||||||
|
|
||||||
[_wakeupButton setTitleColor:[ThemeManager textColorGray] forState:UIControlStateNormal]; // theme
|
[_wakeupButton setTitleColor:[ThemeManager textColorGray] forState:UIControlStateNormal]; // theme
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:self.wakeupButton.frame.size.height/3.2*_sizeFactor weight:UIImageSymbolWeightBold];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:self.wakeupButton.frame.size.height/3.2*_sizeFactor weight:UIImageSymbolWeightBold];
|
||||||
UIImage *templateImage = [UIImage systemImageNamed:@"power" withConfiguration:config];
|
UIImage *templateImage = [UIImage systemImageNamed:@"power" withConfiguration:config];
|
||||||
UIImage *coloredImage = [templateImage imageWithTintColor:[ThemeManager textColorGray] renderingMode:UIImageRenderingModeAlwaysOriginal];
|
UIImage *coloredImage = [templateImage imageWithTintColor:[ThemeManager textColorGray] renderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ static CGRect streamViewBounds;
|
|||||||
if (fileData && !error) {
|
if (fileData && !error) {
|
||||||
// 3. 成功读取
|
// 3. 成功读取
|
||||||
NSSet *classes = [NSSet setWithObjects: [NSMutableData class], [NSMutableArray class], nil];
|
NSSet *classes = [NSSet setWithObjects: [NSMutableData class], [NSMutableArray class], nil];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
// 在 iOS 13 及以上使用 unarchivedObjectOfClasses
|
// 在 iOS 13 及以上使用 unarchivedObjectOfClasses
|
||||||
profilesEncoded = [NSKeyedUnarchiver unarchivedObjectOfClasses:classes fromData:fileData error:&error];
|
profilesEncoded = [NSKeyedUnarchiver unarchivedObjectOfClasses:classes fromData:fileData error:&error];
|
||||||
} else {
|
} else {
|
||||||
@@ -402,7 +402,7 @@ static CGRect streamViewBounds;
|
|||||||
|
|
||||||
- (OnScreenButtonState *)unarchiveButtonStateEncoded:(NSData *)data {
|
- (OnScreenButtonState *)unarchiveButtonStateEncoded:(NSData *)data {
|
||||||
OnScreenButtonState* buttonState;
|
OnScreenButtonState* buttonState;
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
// 在 iOS 13 及以上使用 unarchivedObjectOfClasses
|
// 在 iOS 13 及以上使用 unarchivedObjectOfClasses
|
||||||
buttonState = [NSKeyedUnarchiver unarchivedObjectOfClasses:[NSSet setWithObjects:[NSString class], [OnScreenButtonState class], nil]
|
buttonState = [NSKeyedUnarchiver unarchivedObjectOfClasses:[NSSet setWithObjects:[NSString class], [OnScreenButtonState class], nil]
|
||||||
fromData:data
|
fromData:data
|
||||||
|
|||||||
@@ -1032,7 +1032,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
|
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
// Disable the 3 finger tap gestures that trigger the copy/paste/undo toolbar on iOS 13+
|
// Disable the 3 finger tap gestures that trigger the copy/paste/undo toolbar on iOS 13+
|
||||||
return gestureRecognizer.name == nil || ![gestureRecognizer.name hasPrefix:@"kbProductivity."];
|
return gestureRecognizer.name == nil || ![gestureRecognizer.name hasPrefix:@"kbProductivity."];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
// 切换按钮
|
// 切换按钮
|
||||||
_toggleButton = [UIButton buttonWithType:UIButtonTypeSystem];
|
_toggleButton = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||||
_toggleArea = [UIButton buttonWithType:UIButtonTypeSystem];
|
_toggleArea = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:_headerViewHeight*0.31 weight:UIImageSymbolWeightMedium];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:_headerViewHeight*0.31 weight:UIImageSymbolWeightMedium];
|
||||||
[_toggleButton setImage:[UIImage systemImageNamed:@"chevron.left" withConfiguration:config] forState:UIControlStateNormal];
|
[_toggleButton setImage:[UIImage systemImageNamed:@"chevron.left" withConfiguration:config] forState:UIControlStateNormal];
|
||||||
} else {
|
} else {
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
#pragma mark - Public Methods
|
#pragma mark - Public Methods
|
||||||
|
|
||||||
- (void)setSectionIcon:(UIImage *)icon {
|
- (void)setSectionIcon:(UIImage *)icon {
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithWeight:UIImageSymbolWeightSemibold];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithWeight:UIImageSymbolWeightSemibold];
|
||||||
_iconImageView.image = [icon imageWithConfiguration:config];
|
_iconImageView.image = [icon imageWithConfiguration:config];
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ static UIUserInterfaceStyle _privateUserInterfaceStyle = UIUserInterfaceStyleUns
|
|||||||
static UIUserInterfaceStyle _userInterfaceStyle;
|
static UIUserInterfaceStyle _userInterfaceStyle;
|
||||||
|
|
||||||
+ (UIColor *)getUIStyle{
|
+ (UIColor *)getUIStyle{
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UITraitCollection *traitCollection = [UIScreen mainScreen].traitCollection;
|
UITraitCollection *traitCollection = [UIScreen mainScreen].traitCollection;
|
||||||
if(_privateUserInterfaceStyle == UIUserInterfaceStyleUnspecified) {
|
if(_privateUserInterfaceStyle == UIUserInterfaceStyleUnspecified) {
|
||||||
_userInterfaceStyle = traitCollection.userInterfaceStyle;
|
_userInterfaceStyle = traitCollection.userInterfaceStyle;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ static UIImage* noImage;
|
|||||||
// Use UIContextMenuInteraction on iOS 13.0+ and a standard UILongPressGestureRecognizer
|
// Use UIContextMenuInteraction on iOS 13.0+ and a standard UILongPressGestureRecognizer
|
||||||
// for tvOS devices and iOS prior to 13.0.
|
// for tvOS devices and iOS prior to 13.0.
|
||||||
#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIContextMenuInteraction* rightClickInteraction = [[UIContextMenuInteraction alloc] initWithDelegate:self];
|
UIContextMenuInteraction* rightClickInteraction = [[UIContextMenuInteraction alloc] initWithDelegate:self];
|
||||||
[self addInteraction:rightClickInteraction];
|
[self addInteraction:rightClickInteraction];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ static const int LABEL_DY = 20;
|
|||||||
// Use UIContextMenuInteraction on iOS 13.0+ and a standard UILongPressGestureRecognizer
|
// Use UIContextMenuInteraction on iOS 13.0+ and a standard UILongPressGestureRecognizer
|
||||||
// for tvOS devices and iOS prior to 13.0.
|
// for tvOS devices and iOS prior to 13.0.
|
||||||
#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIContextMenuInteraction* rightClickInteraction = [[UIContextMenuInteraction alloc] initWithDelegate:self];
|
UIContextMenuInteraction* rightClickInteraction = [[UIContextMenuInteraction alloc] initWithDelegate:self];
|
||||||
[self addInteraction:rightClickInteraction];
|
[self addInteraction:rightClickInteraction];
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -738,7 +738,7 @@
|
|||||||
// Set the label's frame with the calculated x-position
|
// Set the label's frame with the calculated x-position
|
||||||
self.currentProfileLabel.frame = CGRectMake(profileLabelXPosition, self.currentProfileLabel.frame.origin.y, self.currentProfileLabel.frame.size.width, self.currentProfileLabel.frame.size.height);
|
self.currentProfileLabel.frame = CGRectMake(profileLabelXPosition, self.currentProfileLabel.frame.origin.y, self.currentProfileLabel.frame.size.width, self.currentProfileLabel.frame.size.height);
|
||||||
self.currentProfileLabel.hidden = NO; // Show Current Profile display
|
self.currentProfileLabel.hidden = NO; // Show Current Profile display
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
self.currentProfileLabel.textAlignment = NSTextAlignmentNatural;
|
self.currentProfileLabel.textAlignment = NSTextAlignmentNatural;
|
||||||
self.currentProfileLabel.numberOfLines = 2;
|
self.currentProfileLabel.numberOfLines = 2;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls {
|
|||||||
NSMutableArray *profilesEncoded;
|
NSMutableArray *profilesEncoded;
|
||||||
// 解码原始的NSArray对象,得到包含编码对象的数组
|
// 解码原始的NSArray对象,得到包含编码对象的数组
|
||||||
error = nil;
|
error = nil;
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
// 在 iOS 13 及以上使用 unarchivedObjectOfClasses
|
// 在 iOS 13 及以上使用 unarchivedObjectOfClasses
|
||||||
profilesEncoded = [NSKeyedUnarchiver unarchivedObjectOfClasses:classes fromData:fileData error:&error];
|
profilesEncoded = [NSKeyedUnarchiver unarchivedObjectOfClasses:classes fromData:fileData error:&error];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ static NSMutableSet* hostList;
|
|||||||
|
|
||||||
- (void)updateTitle {
|
- (void)updateTitle {
|
||||||
|
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
navBarAppearanceScroll.titleTextAttributes = navBarAppearanceStandard.titleTextAttributes = @{
|
navBarAppearanceScroll.titleTextAttributes = navBarAppearanceStandard.titleTextAttributes = @{
|
||||||
NSFontAttributeName: [UIFont systemFontOfSize:20 weight:UIFontWeightMedium],
|
NSFontAttributeName: [UIFont systemFontOfSize:20 weight:UIFontWeightMedium],
|
||||||
NSForegroundColorAttributeName: [ThemeManager textColor] // 可选,设置标题颜色
|
NSForegroundColorAttributeName: [ThemeManager textColor] // 可选,设置标题颜色
|
||||||
@@ -151,7 +151,7 @@ static NSMutableSet* hostList;
|
|||||||
self.title = [LocalizationHelper localizedStringForKey: @"Searching for PCs on your network..."] ;
|
self.title = [LocalizationHelper localizedStringForKey: @"Searching for PCs on your network..."] ;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
navBarAppearanceScroll.titleTextAttributes = navBarAppearanceStandard.titleTextAttributes = @{
|
navBarAppearanceScroll.titleTextAttributes = navBarAppearanceStandard.titleTextAttributes = @{
|
||||||
NSFontAttributeName: [UIFont systemFontOfSize:24 weight:UIFontWeightSemibold],
|
NSFontAttributeName: [UIFont systemFontOfSize:24 weight:UIFontWeightSemibold],
|
||||||
NSForegroundColorAttributeName: [ThemeManager textColor] // 可选,设置标题颜色
|
NSForegroundColorAttributeName: [ThemeManager textColor] // 可选,设置标题颜色
|
||||||
@@ -165,7 +165,7 @@ static NSMutableSet* hostList;
|
|||||||
self.title = [LocalizationHelper localizedStringForKey: @"Hosts" ];
|
self.title = [LocalizationHelper localizedStringForKey: @"Hosts" ];
|
||||||
//self.title = nil;
|
//self.title = nil;
|
||||||
}
|
}
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
[self applyNavBarAppearance];
|
[self applyNavBarAppearance];
|
||||||
} else {
|
} else {
|
||||||
// Fallback on earlier versions
|
// Fallback on earlier versions
|
||||||
@@ -1280,7 +1280,7 @@ static NSMutableSet* hostList;
|
|||||||
|
|
||||||
// 设置图标(SF Symbol)
|
// 设置图标(SF Symbol)
|
||||||
|
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:17 weight:UIImageSymbolWeightMedium];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:17 weight:UIImageSymbolWeightMedium];
|
||||||
UIImage *image = [UIImage systemImageNamed:@"plus.circle" withConfiguration:config];
|
UIImage *image = [UIImage systemImageNamed:@"plus.circle" withConfiguration:config];
|
||||||
[button setImage:image forState:UIControlStateNormal];
|
[button setImage:image forState:UIControlStateNormal];
|
||||||
@@ -1320,7 +1320,7 @@ static NSMutableSet* hostList;
|
|||||||
button.clipsToBounds = YES;
|
button.clipsToBounds = YES;
|
||||||
|
|
||||||
// 设置图标(SF Symbol)
|
// 设置图标(SF Symbol)
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:buttonHeight*0.85 weight:UIImageSymbolWeightRegular];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:buttonHeight*0.85 weight:UIImageSymbolWeightRegular];
|
||||||
UIImage *image = [UIImage systemImageNamed:@"questionmark.circle" withConfiguration:config];
|
UIImage *image = [UIImage systemImageNamed:@"questionmark.circle" withConfiguration:config];
|
||||||
[button setImage:image forState:UIControlStateNormal];
|
[button setImage:image forState:UIControlStateNormal];
|
||||||
@@ -1380,7 +1380,7 @@ static NSMutableSet* hostList;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)setupNavBar{
|
- (void)setupNavBar{
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
navBarAppearanceStandard = [[UINavigationBarAppearance alloc] init];
|
navBarAppearanceStandard = [[UINavigationBarAppearance alloc] init];
|
||||||
[navBarAppearanceStandard configureWithOpaqueBackground]; // 不透明
|
[navBarAppearanceStandard configureWithOpaqueBackground]; // 不透明
|
||||||
navBarAppearanceStandard.backgroundColor =[ThemeManager appBackgroundColor];; // 设置你需要的背景色
|
navBarAppearanceStandard.backgroundColor =[ThemeManager appBackgroundColor];; // 设置你需要的背景色
|
||||||
@@ -1419,7 +1419,7 @@ static NSMutableSet* hostList;
|
|||||||
|
|
||||||
[_settingsButton setTarget:self.revealViewController];
|
[_settingsButton setTarget:self.revealViewController];
|
||||||
[_settingsButton setAction:@selector(revealToggle:)];
|
[_settingsButton setAction:@selector(revealToggle:)];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
[_settingsButton setTitle:nil];
|
[_settingsButton setTitle:nil];
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:23 weight:UIImageSymbolWeightMedium ];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:23 weight:UIImageSymbolWeightMedium ];
|
||||||
UIImage *image = [[UIImage systemImageNamed:@"sidebar.left" withConfiguration:config] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
UIImage *image = [[UIImage systemImageNamed:@"sidebar.left" withConfiguration:config] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||||
|
|||||||
@@ -911,7 +911,7 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
_dockedNavBar.translatesAutoresizingMaskIntoConstraints = NO;
|
_dockedNavBar.translatesAutoresizingMaskIntoConstraints = NO;
|
||||||
_dockedNavBar.userInteractionEnabled = YES;
|
_dockedNavBar.userInteractionEnabled = YES;
|
||||||
|
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UINavigationBarAppearance *navBarAppearanceStandard = [[UINavigationBarAppearance alloc] init];
|
UINavigationBarAppearance *navBarAppearanceStandard = [[UINavigationBarAppearance alloc] init];
|
||||||
[navBarAppearanceStandard configureWithOpaqueBackground]; // 不透明
|
[navBarAppearanceStandard configureWithOpaqueBackground]; // 不透明
|
||||||
navBarAppearanceStandard.backgroundColor =[ThemeManager appBackgroundColor];; // 设置你需要的背景色
|
navBarAppearanceStandard.backgroundColor =[ThemeManager appBackgroundColor];; // 设置你需要的背景色
|
||||||
@@ -961,7 +961,7 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] init];
|
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] init];
|
||||||
[backButton setTarget:self];
|
[backButton setTarget:self];
|
||||||
[backButton setAction:@selector(foldRearView)];
|
[backButton setAction:@selector(foldRearView)];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
[backButton setTitle:nil];
|
[backButton setTitle:nil];
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:23 weight:UIImageSymbolWeightMedium ];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:23 weight:UIImageSymbolWeightMedium ];
|
||||||
UIImage *image = [[UIImage systemImageNamed:@"sidebar.left" withConfiguration:config] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
UIImage *image = [[UIImage systemImageNamed:@"sidebar.left" withConfiguration:config] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||||
@@ -979,7 +979,7 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
_disconnectButton = [[UIBarButtonItem alloc] init];
|
_disconnectButton = [[UIBarButtonItem alloc] init];
|
||||||
[_disconnectButton setTarget:self];
|
[_disconnectButton setTarget:self];
|
||||||
[_disconnectButton setAction:@selector(disconnectRemoteSession)];
|
[_disconnectButton setAction:@selector(disconnectRemoteSession)];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
[_disconnectButton setTitle:nil];
|
[_disconnectButton setTitle:nil];
|
||||||
UIImage *image = [[UIImage imageNamed:@"disconnect.svg" ] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
UIImage *image = [[UIImage imageNamed:@"disconnect.svg" ] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
||||||
|
|
||||||
@@ -1002,7 +1002,7 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
if(!_moreButton) _moreButton = [[UIBarButtonItem alloc] init];
|
if(!_moreButton) _moreButton = [[UIBarButtonItem alloc] init];
|
||||||
|
|
||||||
//[moreButton setAction:@selector(moreButtonTapped:)];
|
//[moreButton setAction:@selector(moreButtonTapped:)];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
[_moreButton setTitle:nil];
|
[_moreButton setTitle:nil];
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:23 weight:UIImageSymbolWeightMedium ];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:23 weight:UIImageSymbolWeightMedium ];
|
||||||
UIImage *image = [[UIImage systemImageNamed:@"ellipsis.circle" withConfiguration:config] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
UIImage *image = [[UIImage systemImageNamed:@"ellipsis.circle" withConfiguration:config] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||||
@@ -1039,7 +1039,7 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
|
|
||||||
|
|
||||||
- (void)removeSettingItemSelected{
|
- (void)removeSettingItemSelected{
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
// UIAction* action1 = [self getAllSettingMenuAction];
|
// UIAction* action1 = [self getAllSettingMenuAction];
|
||||||
UIAction* action1 = [self getDoneRemoveSettingAction];
|
UIAction* action1 = [self getDoneRemoveSettingAction];
|
||||||
if (@available(iOS 14.0, *)) _moreButton.menu = [UIMenu menuWithTitle:@"" children:@[action1]];
|
if (@available(iOS 14.0, *)) _moreButton.menu = [UIMenu menuWithTitle:@"" children:@[action1]];
|
||||||
@@ -1051,7 +1051,7 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)doneRemoveSettingItemSelected{
|
- (void)doneRemoveSettingItemSelected{
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIAction* action1 = [self getAllSettingMenuAction];
|
UIAction* action1 = [self getAllSettingMenuAction];
|
||||||
UIAction* action2 = [self getRemoveSettingItemAction];
|
UIAction* action2 = [self getRemoveSettingItemAction];
|
||||||
if (@available(iOS 14.0, *)) _moreButton.menu = [UIMenu menuWithTitle:@"" children:@[action1, action2]];
|
if (@available(iOS 14.0, *)) _moreButton.menu = [UIMenu menuWithTitle:@"" children:@[action1, action2]];
|
||||||
@@ -1146,7 +1146,7 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)favoriteSettingSelected {
|
- (void)favoriteSettingSelected {
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIAction* action1 = [self getAllSettingMenuAction];
|
UIAction* action1 = [self getAllSettingMenuAction];
|
||||||
UIAction* action2 = [self getRemoveSettingItemAction];
|
UIAction* action2 = [self getRemoveSettingItemAction];
|
||||||
if (@available(iOS 14.0, *)) _moreButton.menu = [UIMenu menuWithTitle:@"" children:@[action1, action2]];
|
if (@available(iOS 14.0, *)) _moreButton.menu = [UIMenu menuWithTitle:@"" children:@[action1, action2]];
|
||||||
@@ -1157,7 +1157,7 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)allSettingSelected {
|
- (void)allSettingSelected {
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIAction* action1 = [self getFavoriteMenuAction];
|
UIAction* action1 = [self getFavoriteMenuAction];
|
||||||
if (@available(iOS 14.0, *)) _moreButton.menu = [UIMenu menuWithTitle:@"" children:@[action1]];
|
if (@available(iOS 14.0, *)) _moreButton.menu = [UIMenu menuWithTitle:@"" children:@[action1]];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ BOOL isCustomResolution(CGSize res) {
|
|||||||
- (void)layoutSections{
|
- (void)layoutSections{
|
||||||
MenuSectionView *videoSection = [[MenuSectionView alloc] init];
|
MenuSectionView *videoSection = [[MenuSectionView alloc] init];
|
||||||
videoSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Video"];
|
videoSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Video"];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
[videoSection setSectionIcon:[UIImage systemImageNamed:@"airplayvideo"]];
|
[videoSection setSectionIcon:[UIImage systemImageNamed:@"airplayvideo"]];
|
||||||
} else [videoSection setSectionIcon:nil];
|
} else [videoSection setSectionIcon:nil];
|
||||||
|
|
||||||
@@ -417,7 +417,7 @@ BOOL isCustomResolution(CGSize res) {
|
|||||||
|
|
||||||
MenuSectionView *gesturesSection = [[MenuSectionView alloc] init];
|
MenuSectionView *gesturesSection = [[MenuSectionView alloc] init];
|
||||||
gesturesSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Gestures"];
|
gesturesSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Gestures"];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
[gesturesSection setSectionIcon:[UIImage systemImageNamed:@"hand.draw"]];
|
[gesturesSection setSectionIcon:[UIImage systemImageNamed:@"hand.draw"]];
|
||||||
} else [gesturesSection setSectionIcon:nil];
|
} else [gesturesSection setSectionIcon:nil];
|
||||||
|
|
||||||
@@ -775,7 +775,7 @@ BOOL isCustomResolution(CGSize res) {
|
|||||||
|
|
||||||
- (void)attachRemoveButtonForStack:(UIStackView* )stack{
|
- (void)attachRemoveButtonForStack:(UIStackView* )stack{
|
||||||
UIButton* button = [UIButton buttonWithType:UIButtonTypeSystem];
|
UIButton* button = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:16 weight:UIImageSymbolWeightMedium];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:16 weight:UIImageSymbolWeightMedium];
|
||||||
[button setImage:[UIImage systemImageNamed:@"minus.circle" withConfiguration:config] forState:UIControlStateNormal];
|
[button setImage:[UIImage systemImageNamed:@"minus.circle" withConfiguration:config] forState:UIControlStateNormal];
|
||||||
} else {
|
} else {
|
||||||
@@ -796,7 +796,7 @@ BOOL isCustomResolution(CGSize res) {
|
|||||||
|
|
||||||
- (void)attachInfoTagForStack:(UIStackView* )stack{
|
- (void)attachInfoTagForStack:(UIStackView* )stack{
|
||||||
UIButton* button = [UIButton buttonWithType:UIButtonTypeSystem];
|
UIButton* button = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:13.5 weight:UIImageSymbolWeightBold];
|
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:13.5 weight:UIImageSymbolWeightBold];
|
||||||
[button setImage:[UIImage systemImageNamed:@"info.circle" withConfiguration:config] forState:UIControlStateNormal];
|
[button setImage:[UIImage systemImageNamed:@"info.circle" withConfiguration:config] forState:UIControlStateNormal];
|
||||||
} else {
|
} else {
|
||||||
@@ -1729,7 +1729,7 @@ BOOL isCustomResolution(CGSize res) {
|
|||||||
for (UIView *subview in view.subviews) {
|
for (UIView *subview in view.subviews) {
|
||||||
if ([subview isKindOfClass:[UILabel class]]) {
|
if ([subview isKindOfClass:[UILabel class]]) {
|
||||||
UILabel *label = (UILabel *)subview;
|
UILabel *label = (UILabel *)subview;
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
label.layer.filters = nil;
|
label.layer.filters = nil;
|
||||||
label.textColor = [ThemeManager textColor];
|
label.textColor = [ThemeManager textColor];
|
||||||
} else {
|
} else {
|
||||||
@@ -1744,7 +1744,7 @@ BOOL isCustomResolution(CGSize res) {
|
|||||||
for (UIView *subview in view.subviews) {
|
for (UIView *subview in view.subviews) {
|
||||||
if ([subview isKindOfClass:[UISegmentedControl class]]) {
|
if ([subview isKindOfClass:[UISegmentedControl class]]) {
|
||||||
UISegmentedControl *selector = (UISegmentedControl *)subview;
|
UISegmentedControl *selector = (UISegmentedControl *)subview;
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
selector.selectedSegmentTintColor = [ThemeManager appSecondaryColor];
|
selector.selectedSegmentTintColor = [ThemeManager appSecondaryColor];
|
||||||
} else {
|
} else {
|
||||||
// Fallback on earlier versions
|
// Fallback on earlier versions
|
||||||
|
|||||||
@@ -555,7 +555,7 @@
|
|||||||
#if TARGET_OS_TV
|
#if TARGET_OS_TV
|
||||||
[_overlayView setFont:[UIFont systemFontOfSize:24]];
|
[_overlayView setFont:[UIFont systemFontOfSize:24]];
|
||||||
#else
|
#else
|
||||||
if (@available(iOS 13.0, *)) {
|
if (@available(iOS 13.0, *) && false) {
|
||||||
[_overlayView setFont:[UIFont monospacedSystemFontOfSize:12 weight:UIFontWeightRegular]];
|
[_overlayView setFont:[UIFont monospacedSystemFontOfSize:12 weight:UIFontWeightRegular]];
|
||||||
} else {
|
} else {
|
||||||
[_overlayView setFont:[UIFont systemFontOfSize:12]];// Fallback on earlier versions
|
[_overlayView setFont:[UIFont systemFontOfSize:12]];// Fallback on earlier versions
|
||||||
|
|||||||
Reference in new issue
Block a user