Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
Advertisement
Add Comment
Please, Sign In to add comment