123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // FLEXKeyboardHelpViewController.m
- // FLEX
- //
- // Created by Ryan Olson on 9/19/15.
- // Copyright © 2015 f. All rights reserved.
- //
- #import "FLEXKeyboardHelpViewController.h"
- #import "FLEXKeyboardShortcutManager.h"
- #import "KBSelectableTextView.h"
- @interface FLEXKeyboardHelpViewController ()
- #if TARGET_OS_TV
- @property (nonatomic) KBSelectableTextView *textView;
- #else
- @property (nonatomic) UITextView *textView;
- #endif
- @end
- @implementation FLEXKeyboardHelpViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- #if TARGET_OS_TV
- self.textView = [[KBSelectableTextView alloc] initWithFrame:self.view.bounds];
- #else
- self.textView = [[UITextView alloc] initWithFrame:self.view.bounds];
- #endif
- self.textView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
- [self.view addSubview:self.textView];
- #if TARGET_OS_SIMULATOR
- self.textView.text = FLEXKeyboardShortcutManager.sharedManager.keyboardShortcutsDescription;
- #endif
- self.textView.backgroundColor = UIColor.blackColor;
- self.textView.textColor = UIColor.whiteColor;
- self.textView.font = [UIFont boldSystemFontOfSize:14.0];
- #if !TARGET_OS_TV
- self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
- #endif
- self.title = @"Simulator Shortcuts";
- self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(donePressed:)];
- }
- - (void)donePressed:(id)sender {
- [self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
- }
- @end
|