|
5 | 5 | #ifndef FLUTTER_FLUTTERPLATFORMVIEWS_H_ |
6 | 6 | #define FLUTTER_FLUTTERPLATFORMVIEWS_H_ |
7 | 7 |
|
8 | | -#import <CoreMedia/CoreMedia.h> |
9 | | -#import <Foundation/Foundation.h> |
10 | 8 | #import <UIKit/UIKit.h> |
11 | 9 |
|
12 | | -#include "FlutterCodecs.h" |
13 | | -#include "FlutterMacros.h" |
| 10 | +#import "FlutterCodecs.h" |
| 11 | +#import "FlutterMacros.h" |
14 | 12 |
|
15 | 13 | NS_ASSUME_NONNULL_BEGIN |
16 | 14 |
|
17 | | -/** |
18 | | - * An instance of a `UIView` created by a `FlutterPlatformViewFactory`. |
19 | | - * |
20 | | - * This protocol is used to associate a view with a dispose callback. |
21 | | - */ |
22 | | -FLUTTER_EXPORT |
23 | | -@protocol FlutterPlatformView <NSObject> |
24 | | -- (UIView*)view; |
25 | | -/** |
26 | | - * Called when the Flutter engine no longer needs this `view`. |
27 | | - * |
28 | | - * The implementation of this method should release any kept for this view. |
29 | | - */ |
30 | | -- (void)dispose; |
31 | | -@end |
32 | | - |
33 | 15 | FLUTTER_EXPORT |
34 | 16 | @protocol FlutterPlatformViewFactory <NSObject> |
35 | 17 | /** |
36 | 18 | * Create a `FlutterPlatformView`. |
37 | 19 | * |
38 | 20 | * Implemented by iOS code that expose a `UIView` for embedding in a Flutter app. |
39 | 21 | * |
40 | | - * The implementation of this method should create a new `UIView` and return a `FlutterPlatformView` |
41 | | - * that wraps it. |
| 22 | + * The implementation of this method should create a new `UIView` and return it. |
42 | 23 | * |
43 | 24 | * @param frame The rectangle for the newly created `UIView` measued in points. |
44 | | - * @param viewId A unique identifier for this `UIView`. |
45 | | - * @param args Parameters for creating the `UIView` sent from the Dart side of the Flutter app. |
| 25 | + * @param viewIdentifier A unique identifier for this `UIView`. |
| 26 | + * @param arguments Parameters for creating the `UIView` sent from the Dart side of the Flutter app. |
46 | 27 | * If `createArgsCodec` is not implemented, or if no creation arguments were sent from the Dart |
47 | 28 | * code, this will be null. Otherwise this will be the value sent from the Dart code as decoded by |
48 | 29 | * `createArgsCodec`. |
49 | 30 | */ |
50 | | -- (NSObject<FlutterPlatformView>*)createWithFrame:(CGRect)frame |
51 | | - viewId:(int64_t)viewId |
52 | | - andArgs:(id _Nullable)args; |
| 31 | +- (UIView*)createWithFrame:(CGRect)frame |
| 32 | + viewIdentifier:(int64_t)viewId |
| 33 | + arguments:(id _Nullable)args; |
53 | 34 |
|
54 | 35 | /** |
55 | 36 | * Returns the `FlutterMessageCodec` for decoding the args parameter of `createWithFrame`. |
|
0 commit comments