我有一个tableView,显示了一系列歌曲,当我点击其中任意一个时,它会被播放。
-(void) PlaySelectedSong:(id) sender{
Song *aSong=[aCategory.Items objectAtIndex:appDelegate.selectedSong];
NSString *content1=[[NSString alloc] initWithFormat:@"http://192.168.50.108:8888/%@",[aSong.Link stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]];
NSLog(content1);
NSURL *url=[NSURL URLWithString:content1];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in the UIWebView.
webView.delegate=self;
[webView loadRequest:requestObj];
这是它的播放方式。 问题在于,在播放时会显示歌曲的URL。我计划在上面添加一个标签,以便将标签文本设置为歌曲名称。
如何添加标签来实现相同的效果?有人知道吗?需要帮助。
谢谢, Shibin