FLEXKeyboardHelpViewController.m 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // FLEXKeyboardHelpViewController.m
  3. // FLEX
  4. //
  5. // Created by Ryan Olson on 9/19/15.
  6. // Copyright © 2015 f. All rights reserved.
  7. //
  8. #import "FLEXKeyboardHelpViewController.h"
  9. #import "FLEXKeyboardShortcutManager.h"
  10. @interface FLEXKeyboardHelpViewController ()
  11. @property (nonatomic) UITextView *textView;
  12. @end
  13. @implementation FLEXKeyboardHelpViewController
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. self.textView = [[UITextView alloc] initWithFrame:self.view.bounds];
  17. self.textView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
  18. [self.view addSubview:self.textView];
  19. #if TARGET_OS_SIMULATOR
  20. self.textView.text = FLEXKeyboardShortcutManager.sharedManager.keyboardShortcutsDescription;
  21. #endif
  22. self.textView.backgroundColor = UIColor.blackColor;
  23. self.textView.textColor = UIColor.whiteColor;
  24. self.textView.font = [UIFont boldSystemFontOfSize:14.0];
  25. self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
  26. self.title = @"Simulator Shortcuts";
  27. self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(donePressed:)];
  28. }
  29. - (void)donePressed:(id)sender {
  30. [self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
  31. }
  32. @end