
Untitled
By: a guest on
May 2nd, 2012 | syntax:
None | size: 1.23 KB | hits: 12 | expires: Never
How to connect my button's void statement with all of the button's actions.
@interface SuprisedViewController : UIViewController {
IBOutlet UIButton *marsStoryButton;
IBOutlet UIButton *marsStoryHome;
@property (nonatomic, retain) IBOutlet UIButton *marsStoryHome;
@property (nonatomic, retain) IBOutlet UIButton *marsStoryButton;
-(void)marsStoryButtonPressed;
@implementation SuprisedViewController
@synthesize bolloLogo, scaryAlien, exorcist, image1, image2, marsMan, marsStoryButton, marsStoryHome;
-(void)marsStoryButtonPressed {
marsMan.hidden = NO;
marsStoryHome.hidden = NO;
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef soundFileURLRef;
soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"longManScream", CFSTR ("wav"), NULL);
soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"spressedScream", CFSTR ("wav"), NULL);
soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"torturedGirlScream", CFSTR ("wav"), NULL);
UInt32 soundID;
AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
AudioServicesPlaySystemSound(soundID);
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}
-(IBAction)marsStoryButtonPressed;