add .gitignore
This commit is contained in:
84
msext/Class/RootVC/Bridge.h
Executable file
84
msext/Class/RootVC/Bridge.h
Executable file
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// Bridge.h
|
||||
// JS_OC_Call
|
||||
//
|
||||
// Created by 亮亮 on 16/9/7.
|
||||
// Copyright © 2016年 钱袋宝. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <JavaScriptCore/JavaScriptCore.h>
|
||||
@protocol webURLDelegate <NSObject>
|
||||
-(void)backgameData:(NSString *)data;
|
||||
-(void)opensaoma; // 扫一扫
|
||||
-(void)startlocation:(NSString *)Type; //定位
|
||||
-(void)prepareaudio;
|
||||
-(void)startshake;
|
||||
-(void)stopshake;
|
||||
-(int)getcompareCode;
|
||||
-(NSString *)getchannelName;
|
||||
-(double)getbattery;
|
||||
-(int)getnetwork;
|
||||
-(void)SwitchShake:(NSString *)voice;
|
||||
-(void)media:(NSString *)url Type:(NSString *)history Audio:(NSString *)userid;
|
||||
|
||||
-(void)vibrator:(NSString *)time;
|
||||
-(void)repeatvibrator:(NSString *)repeat;
|
||||
-(void)canclevibrator;
|
||||
-(void)friends:(NSString *)one Sharetype:(NSString *)two Url:(NSString *)three Toptitle:(NSString *)four Descript:(NSString *)five;
|
||||
|
||||
-(void)accreditlogin;
|
||||
-(void)browser:(NSString *)url;
|
||||
-(void)src:(NSString *)message Isloop:(NSString *)message2;
|
||||
-(void)Switch:(NSString *)type Over:(NSString *)directory Game:(NSString *)downurl Data:(NSString *)data;
|
||||
-(int)getGameinstall:(NSString *)gamename;
|
||||
-(void)getGameplay:(NSString *)jsondata;
|
||||
-(void)Openurl:(NSString *)url Title:(NSString *)title Data:(NSString *)data;
|
||||
-(NSString *)getmarketname;
|
||||
-(NSString *)gamepastetext;
|
||||
-(void)gameCopytext:(NSString *)text;
|
||||
-(NSString *)getOther;
|
||||
-(NSString *)getothername:(NSString *)othername;
|
||||
-(void)voicePlaying:(NSString *)type;
|
||||
-(void)finishweb;
|
||||
@end
|
||||
@protocol JSProtocol <JSExport>
|
||||
-(void)backgameData:(NSString *)data;
|
||||
-(void)opensaoma; // 扫一扫
|
||||
-(void)startlocation:(NSString *)Type; //定位
|
||||
-(void)prepareaudio;
|
||||
-(void)startshake;
|
||||
-(void)stopshake;
|
||||
-(int)getcompareCode;
|
||||
-(NSString *)getchannelName;
|
||||
-(double)getbattery;
|
||||
-(int)getnetwork;
|
||||
-(void)SwitchShake:(NSString *)voice;
|
||||
-(void)media:(NSString *)url Type:(NSString *)history Audio:(NSString *)userid;
|
||||
|
||||
-(void)vibrator:(NSString *)time;
|
||||
-(void)repeatvibrator:(NSString *)repeat;
|
||||
-(void)canclevibrator;
|
||||
-(void)friends:(NSString *)one Sharetype:(NSString *)two Url:(NSString *)three Toptitle:(NSString *)four Descript:(NSString *)five;
|
||||
|
||||
-(void)accreditlogin;
|
||||
-(void)browser:(NSString *)url;
|
||||
-(void)src:(NSString *)message Isloop:(NSString *)message2;
|
||||
-(void)Switch:(NSString *)type Over:(NSString *)directory Game:(NSString *)downurl Data:(NSString *)data;
|
||||
-(int)getGameinstall:(NSString *)gamename;
|
||||
-(void)getGameplay:(NSString *)jsondata;
|
||||
-(void)Openurl:(NSString *)url Title:(NSString *)title Data:(NSString *)data;
|
||||
-(NSString *)getmarketname;
|
||||
-(NSString *)gamepastetext;
|
||||
-(void)gameCopytext:(NSString *)text;
|
||||
-(NSString *)getOther;
|
||||
-(NSString *)getothername:(NSString *)othername;
|
||||
-(void)voicePlaying:(NSString *)type;
|
||||
-(void)finishweb;
|
||||
@end
|
||||
@interface Bridge : NSObject<JSProtocol>
|
||||
{
|
||||
id<webURLDelegate> delegate;
|
||||
}
|
||||
@property (nonatomic ,retain)id<webURLDelegate> delegate;
|
||||
@end
|
||||
151
msext/Class/RootVC/Bridge.m
Executable file
151
msext/Class/RootVC/Bridge.m
Executable file
@@ -0,0 +1,151 @@
|
||||
//
|
||||
// Bridge.m
|
||||
// JS_OC_Call
|
||||
// ios大师群:150245203,欢迎您的加入
|
||||
// Created by 亮亮 on 16/9/7.
|
||||
// Copyright © 2016年 钱袋宝. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Bridge.h"
|
||||
#import "AppDelegate.h"
|
||||
@implementation Bridge
|
||||
@synthesize delegate;
|
||||
//一下方法都是只是打了个log 等会看log 以及参数能对上就说明js调用了此处的iOS 原生方法
|
||||
|
||||
-(int)getnetwork
|
||||
{
|
||||
return [delegate getnetwork];
|
||||
}
|
||||
-(void)startshake
|
||||
{
|
||||
|
||||
return [delegate startshake];
|
||||
}
|
||||
-(void)stopshake
|
||||
{
|
||||
|
||||
return [delegate stopshake];
|
||||
}
|
||||
-(int)getcompareCode
|
||||
{
|
||||
|
||||
return [delegate getcompareCode];
|
||||
}
|
||||
-(NSString *)getchannelName
|
||||
{
|
||||
return [delegate getchannelName];
|
||||
}
|
||||
-(double)getbattery
|
||||
{
|
||||
return [delegate getbattery];
|
||||
|
||||
}
|
||||
-(void)vibrator:(NSString *)time
|
||||
{
|
||||
|
||||
[delegate vibrator:time];
|
||||
}
|
||||
-(void)repeatvibrator:(NSString *)repeat
|
||||
{
|
||||
|
||||
[delegate repeatvibrator:repeat];
|
||||
}
|
||||
-(void)canclevibrator
|
||||
{
|
||||
|
||||
[self.delegate canclevibrator];
|
||||
}
|
||||
|
||||
-(void)media:(NSString *)url Type:(NSString *)history Audio:(NSString *)userid
|
||||
{
|
||||
|
||||
[self.delegate media:url Type:history Audio:userid ];
|
||||
}
|
||||
|
||||
-(void)SwitchShake:(NSString *)voice
|
||||
{
|
||||
[self.delegate SwitchShake:voice];
|
||||
|
||||
|
||||
}
|
||||
-(void)browser:(NSString *)url
|
||||
{
|
||||
[self.delegate browser:url];
|
||||
}
|
||||
|
||||
-(void)prepareaudio
|
||||
{
|
||||
[self.delegate prepareaudio];
|
||||
}
|
||||
-(void)accreditlogin
|
||||
{
|
||||
[self.delegate accreditlogin];
|
||||
}
|
||||
-(void)friends:(NSString *)one Sharetype:(NSString *)two Url:(NSString *)three Toptitle:(NSString *)four Descript:(NSString *)five
|
||||
{
|
||||
// [self.delegate sharefriend:one type:two webpageUrl:three title:four description:five];
|
||||
[self.delegate friends:one Sharetype:two Url:three Toptitle:four Descript:five];
|
||||
}
|
||||
|
||||
-(void)src:(NSString *)message Isloop:(NSString *)message2
|
||||
{
|
||||
[self.delegate src:message Isloop:message2];
|
||||
}
|
||||
-(void)opensaoma;
|
||||
{
|
||||
[self.delegate opensaoma];
|
||||
}
|
||||
-(void)startlocation:(NSString *)Type
|
||||
{
|
||||
[self.delegate startlocation:Type];
|
||||
}
|
||||
-(void)Switch:(NSString *)type Over:(NSString *)directory Game:(NSString *)downurl Data:(NSString *)data
|
||||
{
|
||||
[self.delegate Switch:type Over:directory Game:downurl Data:data];
|
||||
}
|
||||
-(void)backgameData:(NSString *)data
|
||||
{
|
||||
[self.delegate backgameData:data];
|
||||
}
|
||||
-(int)getGameinstall:(NSString *)gamename
|
||||
{
|
||||
return [self.delegate getGameinstall:gamename];
|
||||
|
||||
}
|
||||
-(void)getGameplay:(NSString *)jsondata
|
||||
{
|
||||
[self.delegate getGameplay:jsondata];
|
||||
}
|
||||
-(void)Openurl:(NSString *)url Title:(NSString *)title Data:(NSString *)data
|
||||
{
|
||||
[self.delegate Openurl:url Title:title Data:data];
|
||||
}
|
||||
-(NSString *)getmarketname
|
||||
{
|
||||
return [self.delegate getmarketname];
|
||||
}
|
||||
-(NSString *)gamepastetext
|
||||
{
|
||||
return [self.delegate gamepastetext];
|
||||
}
|
||||
-(void)gameCopytext:(NSString *)text
|
||||
{
|
||||
[self.delegate gameCopytext:text];
|
||||
}
|
||||
-(NSString *)getOther
|
||||
{
|
||||
return [self.delegate getOther];
|
||||
}
|
||||
-(NSString *)getothername:(NSString *)othername
|
||||
{
|
||||
return [self.delegate getothername:othername];
|
||||
}
|
||||
-(void)voicePlaying:(NSString *)type
|
||||
{
|
||||
[self.delegate voicePlaying:type];
|
||||
}
|
||||
-(void)finishweb
|
||||
{
|
||||
[self.delegate finishweb];
|
||||
}
|
||||
@end
|
||||
26
msext/Class/RootVC/Bridgetwo.h
Executable file
26
msext/Class/RootVC/Bridgetwo.h
Executable file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Bridge.h
|
||||
// JS_OC_Call
|
||||
//
|
||||
// Created by 亮亮 on 16/9/7.
|
||||
// Copyright © 2016年 钱袋宝. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <JavaScriptCore/JavaScriptCore.h>
|
||||
@protocol webURLDelegatetwo <NSObject>
|
||||
-(void)backgameData:(NSString *)data;
|
||||
-(void)finishweb;
|
||||
-(void)browser:(NSString *)url;
|
||||
@end
|
||||
@protocol JSProtocol <JSExport>
|
||||
-(void)backgameData:(NSString *)data;
|
||||
-(void)browser:(NSString *)url;
|
||||
-(void)finishweb;
|
||||
@end
|
||||
@interface Bridgetwo : NSObject<JSProtocol>
|
||||
{
|
||||
id<webURLDelegatetwo> delegate;
|
||||
}
|
||||
@property (nonatomic ,retain)id<webURLDelegatetwo> delegate;
|
||||
@end
|
||||
30
msext/Class/RootVC/Bridgetwo.m
Executable file
30
msext/Class/RootVC/Bridgetwo.m
Executable file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// Bridge.m
|
||||
// JS_OC_Call
|
||||
// ios大师群:150245203,欢迎您的加入
|
||||
// Created by 亮亮 on 16/9/7.
|
||||
// Copyright © 2016年 钱袋宝. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Bridgetwo.h"
|
||||
#import "AppDelegate.h"
|
||||
@implementation Bridgetwo
|
||||
@synthesize delegate;
|
||||
//一下方法都是只是打了个log 等会看log 以及参数能对上就说明js调用了此处的iOS 原生方法
|
||||
|
||||
|
||||
-(void)backgameData:(NSString *)data
|
||||
{
|
||||
[self.delegate backgameData:data];
|
||||
}
|
||||
|
||||
-(void)finishweb
|
||||
{
|
||||
[self.delegate finishweb];
|
||||
}
|
||||
|
||||
-(void)browser:(NSString *)url
|
||||
{
|
||||
[self.delegate browser:url];
|
||||
}
|
||||
@end
|
||||
13
msext/Class/RootVC/NewRootVC.h
Executable file
13
msext/Class/RootVC/NewRootVC.h
Executable file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// NewRootVC.h
|
||||
// msext
|
||||
//
|
||||
// Created by chao on 2017/8/22.
|
||||
// Copyright © 2017年 chao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface NewRootVC : UIViewController
|
||||
|
||||
@end
|
||||
2129
msext/Class/RootVC/NewRootVC.m
Executable file
2129
msext/Class/RootVC/NewRootVC.m
Executable file
File diff suppressed because it is too large
Load Diff
20
msext/Class/RootVC/NewRootVC.xib
Executable file
20
msext/Class/RootVC/NewRootVC.xib
Executable file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="NewRootVC">
|
||||
<connections>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
13
msext/Class/RootVC/RootVC.h
Executable file
13
msext/Class/RootVC/RootVC.h
Executable file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// RootVC.h
|
||||
// msext
|
||||
//
|
||||
// Created by chao on 15/7/23.
|
||||
// Copyright (c) 2015年 chao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface RootVC : UIViewController
|
||||
-(void)canback;
|
||||
@end
|
||||
2053
msext/Class/RootVC/RootVC.m
Executable file
2053
msext/Class/RootVC/RootVC.m
Executable file
File diff suppressed because it is too large
Load Diff
19
msext/Class/RootVC/RootVC.xib
Executable file
19
msext/Class/RootVC/RootVC.xib
Executable file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="RootVC">
|
||||
<connections>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
13
msext/Class/RootVC/fourviewVC.h
Executable file
13
msext/Class/RootVC/fourviewVC.h
Executable file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// fourviewVC.h
|
||||
// msext
|
||||
//
|
||||
// Created by chao on 17/3/24.
|
||||
// Copyright © 2017年 chao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface fourviewVC : UIViewController
|
||||
-(void)initinfo:(NSString *)gamename downurl:(NSString *)url gamedata:(NSString *)data agent:(NSString *)agent_info channel:(NSString *)channelinfo market:(NSString *)marketid gamedir:(NSString *)gamedir_ agentlist:(NSArray *)agentlist_;
|
||||
@end
|
||||
1602
msext/Class/RootVC/fourviewVC.m
Executable file
1602
msext/Class/RootVC/fourviewVC.m
Executable file
File diff suppressed because it is too large
Load Diff
20
msext/Class/RootVC/fourviewVC.xib
Executable file
20
msext/Class/RootVC/fourviewVC.xib
Executable file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="fourviewVC">
|
||||
<connections>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
13
msext/Class/RootVC/gameController.h
Executable file
13
msext/Class/RootVC/gameController.h
Executable file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// gameController.h
|
||||
// msext
|
||||
//
|
||||
// Created by chao on 2017/8/16.
|
||||
// Copyright © 2017年 chao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface gameController : UIViewController
|
||||
-(void)initinfo:(NSString *)gamename downurl:(NSString *)url gamedata:(NSString *)data agent:(NSString *)agent_info channel:(NSString *)channelinfo market:(NSString *)marketid gamedir:(NSString *)gamedir_ agentlist:(NSArray *)agentlist_ gamelist:(NSArray *)gamelist_ result:(int)result;
|
||||
@end
|
||||
2420
msext/Class/RootVC/gameController.m
Executable file
2420
msext/Class/RootVC/gameController.m
Executable file
File diff suppressed because it is too large
Load Diff
20
msext/Class/RootVC/gameController.xib
Executable file
20
msext/Class/RootVC/gameController.xib
Executable file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="gameController">
|
||||
<connections>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
13
msext/Class/RootVC/threeView.h
Executable file
13
msext/Class/RootVC/threeView.h
Executable file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// threeView.h
|
||||
// msext
|
||||
//
|
||||
// Created by chao on 17/3/1.
|
||||
// Copyright © 2017年 chao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface threeView : UIViewController
|
||||
-(void)Openurl:(NSString *)url Title:(NSString *)title Data:(NSString *)data orientation_:(int)orientation_;
|
||||
@end
|
||||
254
msext/Class/RootVC/threeView.m
Executable file
254
msext/Class/RootVC/threeView.m
Executable file
@@ -0,0 +1,254 @@
|
||||
//
|
||||
// threeView.m
|
||||
// msext
|
||||
//
|
||||
// Created by chao on 17/3/1.
|
||||
// Copyright © 2017年 chao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "threeView.h"
|
||||
#import <WebKit/WebKit.h>
|
||||
#import <WebKit/WKWebView.h>
|
||||
#import "Bridgetwo.h"
|
||||
@interface threeView ()
|
||||
<UIWebViewDelegate,UIActionSheetDelegate,webURLDelegatetwo>
|
||||
{
|
||||
UIWebView *webView_;
|
||||
BOOL flag;
|
||||
int orientation;
|
||||
}
|
||||
@property (copy, nonatomic) NSString *weburl;
|
||||
@property (copy, nonatomic) NSString *Navtitle;
|
||||
@end
|
||||
|
||||
@implementation threeView
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (self) {
|
||||
// Custom initialization
|
||||
self.view.backgroundColor=[UIColor colorWithRed:249.0f/255 green:249.0f/255 blue:249.0f/255 alpha:1.0f];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (void)viewDidLoad {
|
||||
if([[[UIDevice currentDevice] systemVersion] floatValue]>=7.0) {
|
||||
self.edgesForExtendedLayout = UIRectEdgeNone;
|
||||
}
|
||||
[super viewDidLoad];
|
||||
flag=true;
|
||||
orientation=0;
|
||||
[FuncPublic SharedFuncPublic]._CurrentShow=3;
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
// [FuncPublic InstanceLabel:@"版本 V7.0" RECT:CGRectMake(0, 165, 320, 38) RECT5:CGRectMake(0, 165, 320, 38) FontName:@"Arial-BoldMT" Red:52 green:52 blue:52 FontSize:18 Target:self.view Lines:0 TAG:-1 Ailgnment:1];
|
||||
}
|
||||
-(void)browser:(NSString *)url
|
||||
{
|
||||
NSString *encodeUrl = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||
NSLog(@"%@", encodeUrl);
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:encodeUrl]];
|
||||
}
|
||||
|
||||
# pragma - table view delegate
|
||||
- (void)viewWillDisappear:(BOOL)animated
|
||||
{
|
||||
// [webView_ removeFromSuperview];
|
||||
// webView_ =nil;
|
||||
}
|
||||
-(void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
if([self.Navtitle isEqualToString:@""])
|
||||
{
|
||||
[self.navigationController setNavigationBarHidden:YES animated:NO];
|
||||
[self.navigationController.navigationBar setBackgroundImage:self BackgroundImage:[FuncPublic CreatedImageFromFile:@"RootNavBG" ofType:@"png"] LeftSel:@selector(PressBack:) RightSel:@selector(PressBack:) CenterSel:nil Title:self.Navtitle TempKind:3];
|
||||
if (webView_==nil) {
|
||||
if (orientation==1) {
|
||||
webView_ = [[UIWebView alloc] initWithFrame:CGRectMake(0,0,DEVH, DEVW)];
|
||||
|
||||
}else
|
||||
{
|
||||
webView_ = [[UIWebView alloc] initWithFrame:CGRectMake(0,0,DEVW, DEVH)];
|
||||
}
|
||||
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:self.weburl]];
|
||||
[self.view addSubview: webView_];
|
||||
if (@available(ios 11.0,*))
|
||||
{
|
||||
UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
webView_.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[webView_ setDelegate:self];
|
||||
webView_.scrollView.bounces=NO;
|
||||
[webView_ loadRequest:request];
|
||||
[[FuncPublic SharedFuncPublic] UISwipeGestrue_Direction:self.view controllerview:self Direction:0 SEL:@selector(PressBack:)];
|
||||
}
|
||||
|
||||
}else
|
||||
{
|
||||
[self.navigationController setNavigationBarHidden:YES animated:NO];
|
||||
[self.navigationController.navigationBar setBackgroundImage:self BackgroundImage:[FuncPublic CreatedImageFromFile:@"RootNavBG" ofType:@"png"] LeftSel:@selector(PressBack:) RightSel:@selector(PressBack:) CenterSel:nil Title:self.Navtitle TempKind:3];
|
||||
if (webView_==nil) {
|
||||
if (orientation==1) {
|
||||
webView_ = [[UIWebView alloc] initWithFrame:CGRectMake(0,0,DEVH, DEVW)];
|
||||
|
||||
}else
|
||||
{
|
||||
webView_ = [[UIWebView alloc] initWithFrame:CGRectMake(0,0,DEVW, DEVH)];
|
||||
}
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:self.weburl]];
|
||||
[self.view addSubview: webView_];
|
||||
if (@available(ios 11.0,*))
|
||||
{
|
||||
UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
webView_.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[webView_ setDelegate:self];
|
||||
webView_.scrollView.bounces=NO;
|
||||
[webView_ loadRequest:request];
|
||||
[[FuncPublic SharedFuncPublic] UISwipeGestrue_Direction:self.view controllerview:self Direction:0 SEL:@selector(PressBack:)];
|
||||
}
|
||||
|
||||
}
|
||||
if (orientation==1) {
|
||||
|
||||
|
||||
CGRect frame = [UIScreen mainScreen].applicationFrame;
|
||||
CGPoint center = CGPointMake(frame.origin.x + ceil(frame.size.width/2), frame.origin.y + ceil(frame.size.height/2));
|
||||
CGFloat duration = [UIApplication sharedApplication].statusBarOrientationAnimationDuration;
|
||||
[UIView beginAnimations:nil context:nil];
|
||||
[UIView setAnimationDuration:duration];
|
||||
//在这里设置view.transform需要匹配的旋转角度的大小就可以了。
|
||||
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
||||
if(orientation==UIInterfaceOrientationLandscapeRight)
|
||||
{
|
||||
webView_.transform=CGAffineTransformMakeRotation(-M_PI/2);
|
||||
}
|
||||
else{
|
||||
|
||||
webView_.transform=CGAffineTransformMakeRotation(M_PI/2);
|
||||
}
|
||||
webView_.center=center;
|
||||
[UIView commitAnimations];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
-(void)Openurl:(NSString *)url Title:(NSString *)title Data:(NSString *)data orientation_:(int)orientation_
|
||||
{
|
||||
// NSString* encodedString = [@"黄超" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||
//
|
||||
// NSString * encodedString2 = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,(CFStringRef)url,NULL,NULL,kCFStringEncodingUTF8);
|
||||
//
|
||||
// NSString *encodedString3 = (NSString *)
|
||||
// CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
|
||||
// (CFStringRef)url,
|
||||
// (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]",
|
||||
// NULL,
|
||||
// kCFStringEncodingUTF8);
|
||||
|
||||
// url=[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||
//url [url stringByReplacingOccurrencesOfString:@"/" withString:@"%7C"];
|
||||
// url=[url stringByReplacingOccurrencesOfString:@"嘎嘎" withString:@"\\U560e\\U560e"];
|
||||
//NSString * htmlstr = [[NSString alloc]initWithContentsOfURL:[NSURL URLWithString:url] encoding:NSUTF8StringEncoding error:nil];
|
||||
// url = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
||||
orientation=orientation_;
|
||||
// url = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)url, nil, nil, kCFStringEncodingUTF8));
|
||||
// url=[url stringByReplacingOccurrencesOfString:@"%23" withString:@"#"];
|
||||
self.weburl=url;//[NSString stringWithFormat:@"%@&%@",url,encodedString];//url;
|
||||
//self.weburl=[self.weburl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
||||
self.Navtitle=title;
|
||||
}
|
||||
|
||||
-(void)finishweb
|
||||
{
|
||||
[FuncPublic PopAnimation:self];
|
||||
}
|
||||
- (void) webViewDidStartLoad:(UIWebView *)webView
|
||||
{
|
||||
[[FuncPublic SharedFuncPublic]StartActivityAnimation:self];
|
||||
NSLog(@"webViewDidStartLoad");
|
||||
}
|
||||
|
||||
- (void) webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
|
||||
{
|
||||
NSLog(@"didFailLoadWithError:%@", error);
|
||||
}
|
||||
-(void)PressBack:(id)sender
|
||||
{
|
||||
[FuncPublic PopAnimation:self];
|
||||
}
|
||||
- (void)cleanCacheAndCookie{
|
||||
//清除cookies
|
||||
NSHTTPCookie *cookie;
|
||||
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
|
||||
for (cookie in [storage cookies]){
|
||||
[storage deleteCookie:cookie];
|
||||
}
|
||||
//清除UIWebView的缓存
|
||||
[[NSURLCache sharedURLCache] removeAllCachedResponses];
|
||||
NSURLCache * cache = [NSURLCache sharedURLCache];
|
||||
[cache removeAllCachedResponses];
|
||||
[cache setDiskCapacity:0];
|
||||
[cache setMemoryCapacity:0];
|
||||
}
|
||||
|
||||
-(void)backgameData:(NSString *)data
|
||||
{
|
||||
// [self cleanCacheAndCookie];
|
||||
//[FuncPublic PopAnimation:self];
|
||||
// [self.navigationController popViewControllerAnimated:YES];
|
||||
// [[NSNotificationCenter defaultCenter] postNotificationName:@"backgameDatatwo" object:data];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self PressBack:nil];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"backgameDatatwo" object:data];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
-(void)dealloc
|
||||
{
|
||||
SG_RELEASE(webView_);
|
||||
[super dealloc];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)webViewDidFinishLoad:(UIWebView *)webView
|
||||
{
|
||||
[[FuncPublic SharedFuncPublic]StopActivityAnimation];
|
||||
NSLog(@"webViewDidFinishLoad");
|
||||
|
||||
JSContext *context = [webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];
|
||||
|
||||
Bridgetwo *jo = [[Bridgetwo alloc] init];
|
||||
context[@"settings"] = jo;
|
||||
context.exceptionHandler = ^(JSContext *context, JSValue *exceptionValue) { context.exception = exceptionValue; NSLog(@"异常信息:%@", exceptionValue); };
|
||||
jo.delegate=self;
|
||||
|
||||
|
||||
|
||||
|
||||
[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitUserSelect='none';"];
|
||||
[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitTouchCallout='none';"];
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
|
||||
20
msext/Class/RootVC/threeView.xib
Executable file
20
msext/Class/RootVC/threeView.xib
Executable file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="threeView">
|
||||
<connections>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
26
msext/Class/RootVC/versionConfig.h
Normal file
26
msext/Class/RootVC/versionConfig.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// versionConfig.h
|
||||
// msext
|
||||
//
|
||||
// Created by 晏明 on 2019/3/16.
|
||||
// Copyright © 2019 chao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
|
||||
@interface versionConfig : NSObject
|
||||
|
||||
@property (nonatomic) NSString *app_version;
|
||||
@property (nonatomic) NSString *app_download;
|
||||
@property (nonatomic) NSString *game_version;
|
||||
@property (nonatomic) NSString *game_download;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
13
msext/Class/RootVC/versionConfig.m
Normal file
13
msext/Class/RootVC/versionConfig.m
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// versionConfig.m
|
||||
// msext
|
||||
//
|
||||
// Created by 晏明 on 2019/3/16.
|
||||
// Copyright © 2019 chao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "versionConfig.h"
|
||||
|
||||
@implementation versionConfig
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user