1
0

sample.objective-c.txt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //
  4. #import "UseQuotes.h"
  5. #import <Use/GTLT.h>
  6. /*
  7. Multi
  8. Line
  9. Comments
  10. */
  11. @implementation Test
  12. - (void) applicationWillFinishLaunching:(NSNotification *)notification
  13. {
  14. }
  15. - (IBAction)onSelectInput:(id)sender
  16. {
  17. NSString* defaultDir = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0];
  18. NSOpenPanel* panel = [NSOpenPanel openPanel];
  19. [panel setAllowedFileTypes:[[NSArray alloc] initWithObjects:@"ipa", @"xcarchive", @"app", nil]];
  20. [panel beginWithCompletionHandler:^(NSInteger result)
  21. {
  22. if (result == NSFileHandlingPanelOKButton)
  23. [self.inputTextField setStringValue:[panel.URL path]];
  24. }];
  25. return YES;
  26. int hex = 0xFEF1F0F;
  27. float ing = 3.14;
  28. ing = 3.14e0;
  29. ing = 31.4e-2;
  30. }
  31. -(id) initWithParams:(id<anObject>) aHandler withDeviceStateManager:(id<anotherObject>) deviceStateManager
  32. {
  33. // add a tap gesture recognizer
  34. UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
  35. NSMutableArray *gestureRecognizers = [NSMutableArray array];
  36. [gestureRecognizers addObject:tapGesture];
  37. [gestureRecognizers addObjectsFromArray:scnView.gestureRecognizers];
  38. scnView.gestureRecognizers = gestureRecognizers;
  39. return tapGesture;
  40. return nil;
  41. }
  42. @end