(WIP) add some UI

This commit is contained in:
Duy Tran Khanh committed 2021-01-29 16:47:07 +07:00
1 parent ce96d0f0a6
commit ae8baaec64
7 files changed
+105 -63

No files matched your search

+11 -3
View File
@@ -1,10 +1,18 @@
#import "AppDelegate.h"
#import "LauncherViewController.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window = window;
[self.window setWindowLevel:3000.0];
[self.window makeKeyAndVisible];
self.window.backgroundColor = [UIColor blackColor];
LauncherViewController *vc = [[LauncherViewController alloc] init];
self.window.rootViewController = vc;
return YES;
}
+48 -59
View File
@@ -1,63 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>PojavLauncher</string>
<key>CFBundleExecutable</key>
<string>PojavLauncher</string>
<key>CFBundleIdentifier</key>
<string>net.kdt.pojavlauncher</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>PojavLauncher</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
<string>metal</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array><!--
<key>UILaunchImages</key>
<array>
<dict>
<key>UILaunchImageName</key>
<string>Default</string>
<key>UILaunchImageMinimumOSVersion</key>
<string>6.0</string>
</dict>
</array> -->
<key>UIFileSharingEnabled</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
</dict>
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>PojavLauncher</string>
<key>CFBundleExecutable</key>
<string>PojavLauncher</string>
<key>CFBundleIdentifier</key>
<string>net.kdt.pojavlauncher</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>PojavLauncher</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIFileSharingEnabled</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
<string>metal</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
+5
View File
@@ -0,0 +1,5 @@
#import <UIKit/UIKit.h>
@interface LauncherViewController : UIViewController
@end
+40
View File
@@ -0,0 +1,40 @@
#import "LauncherViewController.h"
#include "utils.h"
@interface LauncherViewController () {
}
// - (void)method
@end
@implementation LauncherViewController
- (void)viewDidLoad
{
[super viewDidLoad];
CGRect screenBounds = [[UIScreen mainScreen] bounds];
CGFloat screenScale = [[UIScreen mainScreen] scale];
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0.0, 0.0, screenBounds.size.width, screenBounds.size.height)];
scrollView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleWidth;
[button setTitle:@"Launch" forState:UIControlStateNormal];
button.frame = CGRectMake(10.0, 10.0, 100.0, 50.0);
[button addTarget:self action:@selector(showSinaWeiboUserClickHandler:) forControlEvents:UIControlEventTouchUpInside];
[scrollView addSubview:button];
self.view = scrollView;
// [self.view addSubview:scrollView];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
}
@end
+1 -1
View File
@@ -5,7 +5,7 @@ set -e
CFLAGS="-fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O3 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof"
clang -Wl,-rpath,/Applications/PojavLauncher.app/Frameworks -fobjc-arc -x objective-c -Fresources/Frameworks -framework UIKit -framework MetalANGLE -Iresources/Frameworks/MetalANGLE.framework/Headers -dynamiclib -isysroot /var/mobile/theos/sdks/iPhoneOS11.2.sdk $CFLAGS -o libpojavexec.dylib log.m AppDelegate.m UILauncher.m SurfaceViewController.m egl_bridge_ios.m egl_bridge.c input_bridge_v3.c utils.c -DGLES_TESTZ -DUSE_EGLZ
clang -Wl,-rpath,/Applications/PojavLauncher.app/Frameworks -fobjc-arc -x objective-c -Fresources/Frameworks -framework UIKit -framework MetalANGLE -Iresources/Frameworks/MetalANGLE.framework/Headers -dynamiclib -isysroot /var/mobile/theos/sdks/iPhoneOS11.2.sdk $CFLAGS -o libpojavexec.dylib log.m AppDelegate.m UILauncher.m LauncherViewController.m SurfaceViewController.m egl_bridge_ios.m egl_bridge.c input_bridge_v3.c utils.c -DGLES_TESTZ -DUSE_EGLZ
ldid -S../entitlements.xml libpojavexec.dylib
File renamed without changes.
Binary file not shown.