From dfe8b17d3030459f6b66cc1736b4e5823d876fb3 Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Sat, 29 Sep 2018 15:42:52 -1000 Subject: Use new iOS11 UI --- CyteKit/ListController.mm | 2 ++ CyteKit/ViewController.mm | 1 + CyteKit/WebViewController.h | 2 ++ CyteKit/WebViewController.mm | 1 + MobileCydia.app/Info.plist | 6 ++++++ MobileCydia.mm | 6 ++++++ 6 files changed, 18 insertions(+) diff --git a/CyteKit/ListController.mm b/CyteKit/ListController.mm index 7d90045..adc55fd 100644 --- a/CyteKit/ListController.mm +++ b/CyteKit/ListController.mm @@ -155,6 +155,8 @@ static CGFloat CYStatusBarHeight() { [self setView:view]; list_ = [[[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStylePlain] autorelease]; + if ([list_ respondsToSelector:@selector(setCellLayoutMarginsFollowReadableWidth:)]) + [list_ setCellLayoutMarginsFollowReadableWidth:NO]; [list_ setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)]; [view addSubview:list_]; diff --git a/CyteKit/ViewController.mm b/CyteKit/ViewController.mm index 41e7ea9..72b7593 100644 --- a/CyteKit/ViewController.mm +++ b/CyteKit/ViewController.mm @@ -84,6 +84,7 @@ // Load on first appearance. We don't need to set the loaded flag here // because it is set for us the first time -reloadData is called. + self.navigationController.navigationBar.prefersLargeTitles = YES; if (![self hasLoaded]) [self reloadData]; } diff --git a/CyteKit/WebViewController.h b/CyteKit/WebViewController.h index 477828c..f29fd2b 100644 --- a/CyteKit/WebViewController.h +++ b/CyteKit/WebViewController.h @@ -22,6 +22,8 @@ #ifndef CyteKit_WebViewController_H #define CyteKit_WebViewController_H +#define PACKED_VERSION(major, minor, tiny) ((((major) & 0xffff) << 16) | (((minor) & 0xff) << 8) | ((tiny) & 0xff)) + #include "CyteKit/ViewController.h" #include "CyteKit/WebView.h" diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index 9d1866a..329d568 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -213,6 +213,7 @@ static _H Diversions_; + (void) _initialize { [WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]; + [WebPreferences setWebKitLinkTimeVersion:PACKED_VERSION(3453,0,0)]; void *js(NULL); if (js == NULL) diff --git a/MobileCydia.app/Info.plist b/MobileCydia.app/Info.plist index aeaf0ec..6a7bac4 100644 --- a/MobileCydia.app/Info.plist +++ b/MobileCydia.app/Info.plist @@ -48,6 +48,12 @@ DTSDKName iphoneos2.0.saurik + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + DTPlatformVersion 8.0 diff --git a/MobileCydia.mm b/MobileCydia.mm index 1c7e0e4..011fb7c 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -6700,6 +6700,8 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi - (void) loadView { list_ = [[[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease]; + if ([list_ respondsToSelector:@selector(setCellLayoutMarginsFollowReadableWidth:)]) + [list_ setCellLayoutMarginsFollowReadableWidth:NO]; [list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth]; [list_ setRowHeight:46]; [(UITableView *) list_ setDataSource:self]; @@ -7253,6 +7255,8 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi [self setView:view]; table_ = [[[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStyleGrouped] autorelease]; + if ([table_ respondsToSelector:@selector(setCellLayoutMarginsFollowReadableWidth:)]) + [table_ setCellLayoutMarginsFollowReadableWidth:NO]; [table_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth]; [(UITableView *) table_ setDataSource:self]; [table_ setDelegate:self]; @@ -7960,6 +7964,8 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi - (void) loadView { list_ = [[[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain] autorelease]; + if ([list_ respondsToSelector:@selector(setCellLayoutMarginsFollowReadableWidth:)]) + [list_ setCellLayoutMarginsFollowReadableWidth:NO]; [list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth]; [list_ setRowHeight:53]; [(UITableView *) list_ setDataSource:self]; -- cgit v1.2.3