Guest User

Untitled

a guest
May 2nd, 2012
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. How to connect my button's void statement with all of the button's actions.
  2. @interface SuprisedViewController : UIViewController {
  3.  
  4. IBOutlet UIButton *marsStoryButton;
  5. IBOutlet UIButton *marsStoryHome;
  6.  
  7. @property (nonatomic, retain) IBOutlet UIButton *marsStoryHome;
  8. @property (nonatomic, retain) IBOutlet UIButton *marsStoryButton;
  9. -(void)marsStoryButtonPressed;
  10.  
  11. @implementation SuprisedViewController
  12.  
  13. @synthesize bolloLogo, scaryAlien, exorcist, image1, image2, marsMan, marsStoryButton, marsStoryHome;
  14.  
  15.  
  16.  
  17. -(void)marsStoryButtonPressed {
  18.  
  19. marsMan.hidden = NO;
  20. marsStoryHome.hidden = NO;
  21.  
  22. CFBundleRef mainBundle = CFBundleGetMainBundle();
  23. CFURLRef soundFileURLRef;
  24. soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"longManScream", CFSTR ("wav"), NULL);
  25.  
  26. soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"spressedScream", CFSTR ("wav"), NULL);
  27.  
  28. soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"torturedGirlScream", CFSTR ("wav"), NULL);
  29.  
  30.  
  31. UInt32 soundID;
  32. AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
  33. AudioServicesPlaySystemSound(soundID);
  34.  
  35. AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
  36. }
  37.  
  38. -(IBAction)marsStoryButtonPressed;
Advertisement
Add Comment
Please, Sign In to add comment