FLEXKeyboardHelpViewController.m 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #if !TARGET_OS_TV
  26. self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
  27. #endif
  28. self.title = @"Simulator Shortcuts";
  29. self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(donePressed:)];
  30. }
  31. - (void)donePressed:(id)sender {
  32. [self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
  33. }
  34. @end