I created a easy view controller and its Xib File for my Flutter plugin on IOS platform.
import UIKit
class MyViewController: UIViewController {
override func viewDidLoad() {
tremendous.viewDidLoad()
}
}
On my IOS plugin class I need to exchange this new view controller with default view controller:
public class MyFlutterTheoryPlugin: NSObject, FlutterPlugin {
public func deal with(_ name: FlutterMethodCall, outcome: @escaping FlutterResult) {
change name.technique {
case Constants.INITIATE_EVENTS:
let vc = MyViewController()
vc.modalPresentationStyle = .fullScreen
UIApplication.shared.delegate?.window??.rootViewController?.current(vc, animated: true, completion: nil)
default:
outcome(FlutterMethodNotImplemented)
}
}
However when I’m working the app, I simply see a black display on the simulator.