Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 1.23 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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;