11
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#import <AdSupport/AdSupport.h>
|
||||
#import <AppTrackingTransparency/AppTrackingTransparency.h>
|
||||
#import <SVProgressHUD.h>
|
||||
#import <SDWebImage.h>
|
||||
|
||||
#import "MacroDefine.h"
|
||||
#import "MainOldViewController.h"
|
||||
@@ -61,7 +62,7 @@
|
||||
request.HTTPMethod = @"PUT";
|
||||
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
|
||||
|
||||
NSDictionary *parmas = @{@"userId":[NSNumber numberWithInteger:[Tinju55UserID integerValue]]};
|
||||
NSDictionary *parmas = @{@"userId":[NSNumber numberWithInteger:[TESTUserID integerValue]]};
|
||||
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parmas options:NSJSONWritingPrettyPrinted error:nil];
|
||||
request.HTTPBody = jsonData;
|
||||
|
||||
@@ -240,26 +241,27 @@
|
||||
if (type == 2 && !ISNULLSTR(image)) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSURL *url = [NSURL URLWithString:image];
|
||||
NSData *data = [NSData dataWithContentsOfURL:url];
|
||||
|
||||
UIView *bgView = [[UIView alloc] initWithFrame:self.window.bounds];
|
||||
bgView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
|
||||
|
||||
UIImageView *imageview = [[UIImageView alloc] initWithFrame:CGRectMake(20, 80, bgView.frame.size.width-40, bgView.frame.size.height-160)];
|
||||
imageview.image = [UIImage imageWithData:data];
|
||||
imageview.contentMode = UIViewContentModeScaleAspectFill;
|
||||
[imageview sd_setImageWithURL:url];
|
||||
imageview.userInteractionEnabled = NO;
|
||||
imageview.contentMode = UIViewContentModeScaleAspectFit;
|
||||
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapImageView:)];
|
||||
[imageview addGestureRecognizer:tap];
|
||||
[bgView addGestureRecognizer:tap];
|
||||
|
||||
[self.window addSubview:bgView];
|
||||
[bgView addSubview:imageview];
|
||||
});
|
||||
}else if (type == 3 && !ISNULLSTR(jumpUrl)) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
MainOldViewController *view = [[MainOldViewController alloc] init];
|
||||
view.gameURLString = jumpUrl;
|
||||
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
|
||||
MainOldViewController *view = [sb instantiateViewControllerWithIdentifier:@"MainOldViewController"];
|
||||
view.isPresent = YES;
|
||||
view.gameURLString = jumpUrl;
|
||||
view.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[self.window.rootViewController presentViewController:view animated:YES completion:^{}];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user