ラジオを聴けるiPhoneアプリを作りたいです。以下は私がこれまでに行ったことですが、ボタンをクリックしても何も起こりません.
前もって感謝します。
#import <UIKit/UIKit.h>
@interface RadioViewController : UIViewController{
IBOutlet UIWebView *webView;
}
-(IBAction)radio;
@property(nonatomic,retain)UIWebView *webview;
@end
#import "RadioViewController.h"
#import <MediaPlayer/MediaPlayer.h>
@implementation RadioViewController
@synthesize webview;
-(IBAction)radio{
NSURL *url = [NSURL URLWithString:@"http://db5195728.tis.core.005.cdn.streamfarm.net:80/3212_erf_96_live.mp3"];
NSURLRequest *req = [NSURLRequest requestWithURL: url];
[webview loadRequest:req];
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end