Monday, April 1, 2024
HomeiOS Developmentswift - Flutter IOS plugin reveals black display

swift – Flutter IOS plugin reveals black display


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.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments