Flutter Engine
 
Loading...
Searching...
No Matches
TextPlatformView Class Reference

#include <TextPlatformView.h>

Inheritance diagram for TextPlatformView:
<FlutterPlatformView>

Instance Methods

(instancetype) - initWithFrame:viewIdentifier:arguments:binaryMessenger:
 
(UIView *) - view
 

Detailed Description

Definition at line 12 of file TextPlatformView.h.

Method Documentation

◆ initWithFrame:viewIdentifier:arguments:binaryMessenger:

- (instancetype) initWithFrame: (CGRect)  frame
viewIdentifier: (int64_t)  viewId
arguments: (id _Nullable)  args
binaryMessenger: (NSObject<FlutterBinaryMessenger>*)  messenger 

Definition at line 71 of file TextPlatformView.m.

74 :(CGRect)frame
75 viewIdentifier:(int64_t)viewId
76 arguments:(id _Nullable)args
77 binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger {
78 self = [super init];
79 if (self) {
80 _containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 250, 100)];
81 _containerView.backgroundColor = UIColor.lightGrayColor;
82 _containerView.clipsToBounds = YES;
83 _containerView.accessibilityIdentifier = @"platform_view";
84
85 _textView = [[UITextView alloc] initWithFrame:CGRectMake(50.0, 50.0, 250, 100)];
86 _textView.backgroundColor = UIColor.lightGrayColor;
87 _textView.textColor = UIColor.blueColor;
88 [_textView setFont:[UIFont systemFontOfSize:52]];
89 _textView.text = args;
90 _textView.autoresizingMask =
91 (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
92 [_containerView addSubview:_textView];
93
94 TestTapGestureRecognizer* gestureRecognizer =
95 [[TestTapGestureRecognizer alloc] initWithTarget:self action:@selector(platformViewTapped)];
96
97 [_textView addGestureRecognizer:gestureRecognizer];
98 gestureRecognizer.testTapGestureRecognizerDelegate = self;
99
100 _textView.accessibilityLabel = @"";
101
102 _viewCreated = NO;
103 }
104 return self;
105}
BOOL _viewCreated
UITextView * _textView
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
NSObject< TestGestureRecognizerDelegate > * testTapGestureRecognizerDelegate
const uintptr_t id

◆ view

- (UIView *) view

Returns a reference to the UIView that is wrapped by this FlutterPlatformView.

Reimplemented from <FlutterPlatformView>.

Definition at line 71 of file TextPlatformView.m.

107 {
108 // Makes sure the engine only calls this method once.
109 if (_viewCreated) {
110 abort();
111 }
112 _viewCreated = YES;
113 return _containerView;
114}

The documentation for this class was generated from the following files: