12345678910111213141516171819202122232425262728 |
- //
- // MyFlutterViewFactory.swift
- // Runner
- //
- // Created by 大唐云 on 2021/6/3.
- //
- import Foundation
- import Flutter
- class MyFlutterViewFactory: NSObject,FlutterPlatformViewFactory {
-
- var messenger:FlutterBinaryMessenger
-
- init(messenger:FlutterBinaryMessenger) {
- self.messenger = messenger
- super.init()
- }
-
- func create(withFrame frame: CGRect, viewIdentifier viewId: Int64, arguments args: Any?) -> FlutterPlatformView {
- return YSFlutterView(frame,viewID: viewId,args: args,messenger: messenger)
- }
-
- func createArgsCodec() -> FlutterMessageCodec & NSObjectProtocol {
- return FlutterStandardMessageCodec.sharedInstance()
- }
- }
|