PDFFindTextView.m 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // PDFFindTextView.m
  3. // PDFReader
  4. //
  5. // Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
  6. //
  7. // The PDF Reader Sample applications are licensed with a modified BSD license.
  8. // Please see License for details. This notice may not be removed from this file.
  9. //
  10. #import "PDFFindTextView.h"
  11. @implementation PDFFindTextView
  12. #pragma mark - Init Methods
  13. - (instancetype)initWithCoder:(NSCoder *)aDecoder {
  14. if (self = [super initWithCoder:aDecoder]) {
  15. self.autoresizingMask = UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin;
  16. self.layer.cornerRadius = 5.0;
  17. self.layer.borderWidth = 1.0;
  18. self.layer.borderColor = [UIColor colorWithRed:31.0/255.0 green:128.0/255.0 blue:228.0/255.0 alpha:1.0].CGColor;
  19. }
  20. return self;
  21. }
  22. - (void)dealloc {
  23. Block_release(_callback);
  24. [super dealloc];
  25. }
  26. #pragma mark - Button Actions
  27. - (IBAction)buttonItemClicked_Previous:(id)sender {
  28. if (self.callback) {
  29. self.callback(0);
  30. }
  31. }
  32. - (IBAction)buttonItemClicked_Next:(id)sender {
  33. if (self.callback) {
  34. self.callback(1);
  35. }
  36. }
  37. - (IBAction)buttonItemClicked_Done:(id)sender {
  38. if (self.callback) {
  39. self.callback(2);
  40. }
  41. }
  42. @end