Files
PojavLauncher_iOS/Natives/LauncherSplitViewController.m
T
Duy Tran Khanh b806c5df3c Many changes and fixes
Changes:
- Decreased multithreaded download max threads to 10
- Moved launcher buttons to match Android UI
- Moved UIKit hooking code to separate file
- The Launcher tab is now marked as under construction.
- Updated README.md to avoid confusion between self-JIT and auto-JIT.

New settings section: UI debugging
- Unlock iPadOS UI: allow iPhone users to unlock every iPadOS-only
features (floating keyboard, popover alert, sheet-styled view
controllers, etc.)
- Show layout bounds, like the one in Android's developer setting
- Show layout overlapping

Fixes:
- App container data is not shown in the Files app due to
`no-container` entitlement, replaced it with `no-sandbox`.
- Ignore jinput-platform libraries to avoid download error
- Multithreaded assets download breaks
- `Send your logs` crashes on iPadOS
2022-09-22 09:52:56 +07:00

43 lines
1.4 KiB
Objective-C

#import "LauncherSplitViewController.h"
#import "LauncherMenuViewController.h"
#import "LauncherViewController.h"
#import "utils.h"
@interface LauncherSplitViewController () {
}
@end
@implementation LauncherSplitViewController
- (void)viewDidLoad {
[super viewDidLoad];
setViewBackgroundColor(self.view);
//TODO: maximumPrimaryColumnWidth
LauncherMenuViewController *masterVc = [[LauncherMenuViewController alloc] init];
UINavigationController *detailVc = [[UINavigationController alloc] init];
detailVc.toolbarHidden = NO;
self.presentsWithGesture = YES;
self.preferredDisplayMode = UISplitViewControllerDisplayModeOneBesideSecondary;
self.viewControllers = @[[[UINavigationController alloc] initWithRootViewController:masterVc], detailVc];
if (@available(iOS 14.0, tvOS 14.0, *)) {
self.preferredSplitBehavior = UISplitViewControllerSplitBehaviorTile;
}
}
- (UITraitCollection *)traitCollection {
// Allows splitting on compact-sized iPhones
UITraitCollection *collection = super.traitCollection;
UITraitCollection *horizontalCollection = [UITraitCollection traitCollectionWithHorizontalSizeClass:UIUserInterfaceSizeClassRegular];
return [UITraitCollection traitCollectionWithTraitsFromCollections:@[collection, horizontalCollection]];
}
- (void)dismissViewController {
[self dismissViewControllerAnimated:YES completion:nil];
}
@end