Flutter Engine
TextPlatformView Class Reference

#import <TextPlatformView.h>

Inheritance diagram for TextPlatformView:

Instance Methods

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

Detailed Description

Definition at line 9 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 73 of file TextPlatformView.m.

References _viewCreated, args, and TestTapGestureRecognizer::testTapGestureRecognizerDelegate.

73  :(CGRect)frame
74  viewIdentifier:(int64_t)viewId
75  arguments:(id _Nullable)args
76  binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger {
77  if ([super init]) {
78  _textView = [[UITextView alloc] initWithFrame:CGRectMake(50.0, 50.0, 250.0, 100.0)];
79  _textView.textColor = UIColor.blueColor;
80  _textView.backgroundColor = UIColor.lightGrayColor;
81  [_textView setFont:[UIFont systemFontOfSize:52]];
82  _textView.text = args;
83  _textView.accessibilityIdentifier = @"platform_view";
84 
85  TestTapGestureRecognizer* gestureRecognizer =
86  [[TestTapGestureRecognizer alloc] initWithTarget:self action:@selector(platformViewTapped)];
87 
88  [_textView addGestureRecognizer:gestureRecognizer];
89  gestureRecognizer.testTapGestureRecognizerDelegate = self;
90  _textView.accessibilityLabel = @"";
91 
92  _viewCreated = NO;
93  }
94  return self;
95 }
G_BEGIN_DECLS FlValue * args
BOOL _viewCreated
NSObject< TestGestureRecognizerDelegate > * testTapGestureRecognizerDelegate

◆ view()

- (UIView *) view

Definition at line 97 of file TextPlatformView.m.

References _viewCreated.

97  {
98  // Makes sure the engine only calls this method once.
99  if (_viewCreated) {
100  abort();
101  }
102  _viewCreated = YES;
103  return _textView;
104 }
BOOL _viewCreated

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