I'm using avaudioplayer and want to add a button to play the sound but i'm not sure how to. Here's current code:
#import UIKit/UIKit.h
@class AudioPlayerViewController;
@interface AudioPlayerAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
AudioPlayerViewController *viewController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet AudioPlayerViewController *viewController;
@end
#import "AudioPlayerAppDelegate.h"
#import "AudioPlayerViewController.h"
@implementation AudioPlayerAppDelegate
@synthesize window;
@synthesize viewController;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after app launch
[window addSubview:viewController.view];
[window makeKeyAndVisible];
}
- (void)dealloc {
[viewController release];
[window release];
[super dealloc];
}
@end