1234567891011121314151617181920212223242526272829303132333435363738 |
- //
- // UserProtocolViewController.m
- // XenonSDK
- //
- // Created by SAGESSE on 2019/5/29.
- // Copyright © 2019 SAGESSE. All rights reserved.
- //
- #import "XenonSDK.h"
- #import "UserProtocolViewController.h"
- @interface UserProtocolViewController ()
- @end
- @implementation UserProtocolViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- NSURL* url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/userPrivacyProtocol/UserProtocol.zip", XSNetwork.baseURL]];;
- if (url == nil) {
- return;
- }
-
- [self.view layoutIfNeeded];
- self.contentTextView.contentInset = UIEdgeInsetsZero;
-
- dispatch_async(dispatch_get_global_queue(0, 0), ^{
- NSString* str = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil];
- dispatch_async(dispatch_get_main_queue(), ^{
- self.contentTextView.text = str;
- });
- });
-
- }
- @end
|