【发布时间】:2012-01-26 20:59:42
【问题描述】:
我有一个数据数组,显示带有标签信息的项目列表。在媒体部分,我想插入一个 URL 来运行视频。在@“播放视频”字符串之后加载 url(使用 NSURL)的正确程序是什么?然后当按下按钮时,url 将加载并显示视频。每个条件的 URL 都不同。感谢您的帮助!
- (void)createData {
NSMutableArray *playList = [[NSMutableArray alloc] init];
Play *play;
NSArray *media;
play = [[Play alloc] init];
play.title = @"Introduction";
play.part = @"Getting in the Game";
media = [[NSArray alloc] initWithObjects:@"Play Video", nil];
play.media = media;
[playList addObject:play];
play = [[Play alloc] init];
play.title = @"Rule #1";
play.part = @"Getting in the Game";
media = [[NSArray alloc] initWithObjects:@"Play Video", nil];
play.media = media;
[playList addObject:play];
play = [[Play alloc] init];
play.title = @"Rule #2";
play.part = @"Getting in the Game";
media = [[NSArray alloc] initWithObjects:@"Play Video", nil];
play.media = media;
[playList addObject:play];
【问题讨论】: