MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / fixtureSource

Function fixtureSource

scripts/integration/fixture.mjs:137–308  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135}
136
137function fixtureSource() {
138 return `#import <QuartzCore/QuartzCore.h>
139#import <UIKit/UIKit.h>
140
141@interface FixtureViewController : UIViewController <UITextFieldDelegate>
142@property (nonatomic, strong) UILabel *statusLabel;
143@property (nonatomic, strong) UITextField *messageField;
144@property (nonatomic, strong) UIView *animationBar;
145@property (nonatomic, strong) CADisplayLink *displayLink;
146@property (nonatomic) NSInteger tapCount;
147@property (nonatomic) CFTimeInterval animationStartedAt;
148- (void)openFixtureURL:(NSURL *)url;
149@end
150
151@implementation FixtureViewController
152
153- (void)viewDidLoad {
154 [super viewDidLoad];
155 self.view.backgroundColor = UIColor.systemBackgroundColor;
156
157 UILabel *titleLabel = [[UILabel alloc] init];
158 titleLabel.text = @"SimDeck Fixture";
159 titleLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleTitle2];
160 titleLabel.textAlignment = NSTextAlignmentCenter;
161 titleLabel.accessibilityIdentifier = @"fixture.title";
162
163 self.statusLabel = [[UILabel alloc] init];
164 self.statusLabel.text = @"Integration Ready";
165 self.statusLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
166 self.statusLabel.textAlignment = NSTextAlignmentCenter;
167 self.statusLabel.accessibilityIdentifier = @"fixture.status";
168
169 UIButton *continueButton = [UIButton buttonWithType:UIButtonTypeSystem];
170 [continueButton setTitle:@"Continue" forState:UIControlStateNormal];
171 continueButton.titleLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];
172 continueButton.accessibilityIdentifier = @"fixture.continue";
173 [continueButton addTarget:self action:@selector(continueTapped:) forControlEvents:UIControlEventTouchUpInside];
174
175 self.messageField = [[UITextField alloc] init];
176 self.messageField.placeholder = @"Message";
177 self.messageField.borderStyle = UITextBorderStyleRoundedRect;
178 self.messageField.autocapitalizationType = UITextAutocapitalizationTypeNone;
179 self.messageField.autocorrectionType = UITextAutocorrectionTypeNo;
180 self.messageField.accessibilityIdentifier = @"fixture.message";
181 self.messageField.delegate = self;
182 [self.messageField addTarget:self action:@selector(messageChanged:) forControlEvents:UIControlEventEditingChanged];
183 [self.messageField.widthAnchor constraintEqualToConstant:240.0].active = YES;
184
185 self.animationBar = [[UIView alloc] initWithFrame:CGRectZero];
186 self.animationBar.backgroundColor = UIColor.systemBlueColor;
187 self.animationBar.layer.cornerRadius = 6.0;
188 self.animationBar.accessibilityIdentifier = @"fixture.animation";
189 self.animationBar.translatesAutoresizingMaskIntoConstraints = NO;
190
191 UIStackView *stack = [[UIStackView alloc] initWithArrangedSubviews:@[
192 titleLabel,
193 self.statusLabel,
194 continueButton,

Callers 1

buildCachedFixtureAppFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected