diff --git a/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents b/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents
index f59b2133..c49f6af2 100644
--- a/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents
+++ b/VoidLink/Limelight.xcdatamodeld/VoidLink v1.0.xcdatamodel/contents
@@ -40,7 +40,7 @@
-
+
diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m
index 6903890c..88a5fee8 100644
--- a/VoidLink/ViewControllers/SettingsViewController.m
+++ b/VoidLink/ViewControllers/SettingsViewController.m
@@ -389,7 +389,7 @@ BOOL isCustomResolution(CGSize res) {
_parentStack.translatesAutoresizingMaskIntoConstraints = NO;
[self.scrollView addSubview:_parentStack];
[NSLayoutConstraint activateConstraints:@[
- [_parentStack.topAnchor constraintEqualToAnchor:self.scrollView.contentLayoutGuide.topAnchor constant: currentSettingsMenuMode == AllSettings ? [self getStandardNavBarHeight] : [self getStandardNavBarHeight]+20],
+ [_parentStack.topAnchor constraintEqualToAnchor:self.scrollView.contentLayoutGuide.topAnchor constant: currentSettingsMenuMode == AllSettings ? [self getStandardNavBarHeight] : [self getStandardNavBarHeight]+10],
[_parentStack.bottomAnchor constraintEqualToAnchor:self.scrollView.contentLayoutGuide.bottomAnchor constant:-20],
[_parentStack.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant: 0], //mark: settingMenuLayout
[_parentStack.widthAnchor constraintEqualToAnchor:self.view.widthAnchor constant:-20] // section width adjusted here //mark: settingMenuLayout
@@ -1166,6 +1166,20 @@ BOOL isCustomResolution(CGSize res) {
}
}
+/*
+- (BOOL)isFirstLaunch {
+ NSString *key = @"appHasLaunchedBefore";
+ BOOL launchedBefore = [[NSUserDefaults standardUserDefaults] boolForKey:key];
+
+ if (!launchedBefore) {
+ [[NSUserDefaults standardUserDefaults] setBool:YES forKey:key];
+ [[NSUserDefaults standardUserDefaults] synchronize]; // iOS 12+ 可省略
+ return YES;
+ }
+ return NO;
+}
+*/
+
- (void)saveFavoriteSettingStackIdentifiers {
if(currentSettingsMenuMode != AllSettings){
@@ -1175,18 +1189,40 @@ BOOL isCustomResolution(CGSize res) {
[_favoriteSettingStackIdentifiers addObject:_parentStack.arrangedSubviews[i].accessibilityIdentifier];
}
}
-
[[NSUserDefaults standardUserDefaults] setObject:_favoriteSettingStackIdentifiers forKey:@"FavoriteSettingStackIdentifiers"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
- (void)loadFavoriteSettingStackIdentifiers {
NSArray *savedArray = [[NSUserDefaults standardUserDefaults] objectForKey:@"FavoriteSettingStackIdentifiers"];
+
if ([savedArray isKindOfClass:[NSArray class]]) {
_favoriteSettingStackIdentifiers = [savedArray mutableCopy];
} else {
_favoriteSettingStackIdentifiers = [NSMutableArray array];
+ [_favoriteSettingStackIdentifiers addObject:@"resolutionStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"fpsStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"bitrateStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"framepacingStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"codecStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"hdrStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"yuv444Stack"];
+ [_favoriteSettingStackIdentifiers addObject:@"pipStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"touchModeStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"pointerVelocityDividerStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"pointerVelocityFactorStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"mousePointerVelocityStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"onScreenWidgetStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"pipStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"backgroundSessionTimerStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"statsOverlayStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"softKeyboardGestureStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"slideToSettingsScreenEdgeStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"slideToToolboxScreenEdgeStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"slideToSettingsDistanceStack"];
+ [_favoriteSettingStackIdentifiers addObject:@"unlockDisplayOrientationStack"];
}
+
/*
for(NSString* str in _favoriteSettingStackIdentifiers){
NSLog(@"favarite setting loaded: %@", str);