We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#ifndef bridge_header_h #define bridge_header_h #import <Cordova/CDVViewController.h> #endif /* bridge_header_h */
另外在Build Setting里面搜索bridge,找到Objective-C Bridging Header添加bridge-header.h文件
Objective-C Bridging Header
import UIKit import ReactiveCocoa import Cordova class CordovaSubView: CDVViewController { override func viewDidLoad() { super.viewDidLoad() self.addSubViews() self.webView.backgroundColor = UIColor.red; let path = Bundle.main.path(forResource: "www/login", ofType:"html") let urlStr = URL.init(fileURLWithPath: path!) print(urlStr) // self.webViewEngine.load(URLRequest(url: URL(string: "http://m.jd.com")!)) self.webViewEngine.load(URLRequest(url: urlStr)) } private func addSubViews() { // let vc = CDVViewController() // vc.view.frame = UIScreen.main.bounds // UIWindow(frame: UIScreen.main.bounds) // self.view.addSubview(vc.view) //创建UIScrollView let scrollV=UIScrollView(frame: CGRect(x:100,y:100,width:50,height:50)) SpeechModal.init().beginSpeech() scrollV.backgroundColor=UIColor.red self.view.addSubview(scrollV) } }
在appdelegate.swift文件添加self.window?.rootViewController = CordovaSubView()语句即能运行
The text was updated successfully, but these errors were encountered:
No branches or pull requests
注意:
另外在Build Setting里面搜索bridge,找到
Objective-C Bridging Header
添加bridge-header.h文件例子
在appdelegate.swift文件添加self.window?.rootViewController = CordovaSubView()语句即能运行
The text was updated successfully, but these errors were encountered: