用于在 iOS 中播放音频文件的简单视图组件。适用于在 UITableView 和 UICollectionView 中使用。
platform :ios, '7.0'
pod 'JBAudioPlayerView'
您可以从 Storyboards、XIBs 或直接从代码中使用它。默认情况下,它使用 AutoLayout,但如果您希望关闭它,请设置 useAutoLayout 为 NO。
JBAudioPlayerView *fromCode = [[JBAudioPlayerView alloc] initWithFrame:CGRectMake(10.0f, 10.0f, 200.0f, 50.0f)];
fromCode.backgroundColor = [UIColor yellowColor];
fromCode.useAutoLayout = NO;
[self.view addSubview:fromCode];