Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Instance Methods | List of all members
TextPlatformView Class Reference

#include <TextPlatformView.h>

Inheritance diagram for TextPlatformView:
<FlutterPlatformView>

Instance Methods

(instancetype) - initWithFrame:viewIdentifier:arguments:binaryMessenger:
 
(UIView *) - view
 
(void) - platformViewTapped [implementation]
 
(void) - gestureTouchesBegan [implementation]
 
(void) - gestureTouchesEnded [implementation]
 

Detailed Description

Definition at line 12 of file TextPlatformView.h.

Method Documentation

◆ gestureTouchesBegan

- (void) gestureTouchesBegan
implementation

Definition at line 71 of file TextPlatformView.m.

120 {
121 _textView.accessibilityLabel =
122 [_textView.accessibilityLabel stringByAppendingString:@"-gestureTouchesBegan"];
123}
UITextView * _textView

◆ gestureTouchesEnded

- (void) gestureTouchesEnded
implementation

Definition at line 71 of file TextPlatformView.m.

125 {
126 _textView.accessibilityLabel =
127 [_textView.accessibilityLabel stringByAppendingString:@"-gestureTouchesEnded"];
128}

◆ 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 if ([super init]) {
79 _containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 250, 100)];
80 _containerView.backgroundColor = UIColor.lightGrayColor;
81 _containerView.clipsToBounds = YES;
82 _containerView.accessibilityIdentifier = @"platform_view";
83
84 _textView = [[UITextView alloc] initWithFrame:CGRectMake(50.0, 50.0, 250, 100)];
85 _textView.backgroundColor = UIColor.lightGrayColor;
86 _textView.textColor = UIColor.blueColor;
87 [_textView setFont:[UIFont systemFontOfSize:52]];
88 _textView.text = args;
89 _textView.autoresizingMask =
90 (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
91 [_containerView addSubview:_textView];
92
93 TestTapGestureRecognizer* gestureRecognizer =
94 [[TestTapGestureRecognizer alloc] initWithTarget:self action:@selector(platformViewTapped)];
95
96 [_textView addGestureRecognizer:gestureRecognizer];
97 gestureRecognizer.testTapGestureRecognizerDelegate = self;
98
99 _textView.accessibilityLabel = @"";
100
101 _viewCreated = NO;
102 }
103 return self;
104}
BOOL _viewCreated
double frame
Definition examples.cpp:31
if(end==-1)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
NSObject< TestGestureRecognizerDelegate > * testTapGestureRecognizerDelegate
init(device_serial, adb_binary)
Definition _adb_path.py:12
const uintptr_t id

◆ platformViewTapped

- (void) platformViewTapped
implementation

Definition at line 71 of file TextPlatformView.m.

115 {
116 _textView.accessibilityLabel =
117 [_textView.accessibilityLabel stringByAppendingString:@"-platformViewTapped"];
118}

◆ 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.

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

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