Your SlideShare is downloading. ×
10分で作るiphoneアプリ on FITEA春イベント
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

10分で作るiphoneアプリ on FITEA春イベント

2,060

Published on

2009.04.18(土)FITEA 春の勉強会 ~ライトニングセッション8連発~

2009.04.18(土)FITEA 春の勉強会 ~ライトニングセッション8連発~

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,060
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import <AudioToolbox/AudioServices.h> @interface sample01ViewController : UIViewController { SystemSoundID pmph; } - (IBAction)myAction1:(id)sender; @end @implementation sample01ViewController - (IBAction)myAction1:(id)sender { if (!pmph){ id sndpath = [[NSBundle mainBundle] pathForResource:@quot;se_saa01quot; ofType:@quot;cafquot; inDirectory:@quot;/quot;]; CFURLRef baseURL = (CFURLRef)[[NSURL alloc] initFileURLWithPath:sndpath]; AudioServicesCreateSystemSoundID(baseURL, &pmph); } AudioServicesPlaySystemSound(pmph); } - (void) dealloc { if (pmph) AudioServicesDisposeSystemSoundID(pmph); [super dealloc]; }

×