Fixes scroll crashes, move login spinner to left
Scrolling crashes: Float cannot be casted to Double
This commit is contained in:
1 parent
147ac079be
commit
bd134ccfde
2 files changed
+12
-6
No files matched your search
@@ -1089,7 +1089,7 @@ public class GLFW
|
||||
break;
|
||||
case CallbackBridge.EVENT_TYPE_SCROLL:
|
||||
if (mGLFWScrollCallback != null) {
|
||||
mGLFWScrollCallback.invoke(ptr, (double)dataArr[1], (double)dataArr[2]);
|
||||
mGLFWScrollCallback.invoke(ptr, (float)dataArr[1], (float)dataArr[2]);
|
||||
}
|
||||
break;
|
||||
case CallbackBridge.EVENT_TYPE_WINDOW_POS:
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
}
|
||||
|
||||
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
|
||||
if(@available(iOS 13.0, *)) {
|
||||
if (@available(iOS 13.0, *)) {
|
||||
if (UITraitCollection.currentTraitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||
self.view.backgroundColor = [UIColor blackColor];
|
||||
} else {
|
||||
@@ -171,8 +171,14 @@
|
||||
|
||||
- (void)displayProgress:(NSString *)title {
|
||||
self.title = title;
|
||||
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:indicator];
|
||||
UIActivityIndicatorViewStyle style;
|
||||
if (@available(iOS 13.0, *)) {
|
||||
style = UIActivityIndicatorViewStyleMedium;
|
||||
} else {
|
||||
style = UIActivityIndicatorViewStyleGray;
|
||||
}
|
||||
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:style];
|
||||
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:indicator];
|
||||
[indicator startAnimating];
|
||||
}
|
||||
|
||||
@@ -227,7 +233,7 @@
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.title = @"";
|
||||
self.navigationItem.rightBarButtonItem = nil;
|
||||
self.navigationItem.leftBarButtonItem = nil;
|
||||
});
|
||||
|
||||
if (result != NULL) {
|
||||
@@ -401,7 +407,7 @@
|
||||
NSURLSessionDataTask *postDataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.title = @"";
|
||||
self.navigationItem.rightBarButtonItem = nil;
|
||||
self.navigationItem.leftBarButtonItem = nil;
|
||||
});
|
||||
|
||||
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
|
||||
|
||||
Reference in new issue
Block a user