在一定程度上我可以给你的样品编码的提问
UIAlertController *alertMusicVideos = [UIAlertController
alertControllerWithTitle:@"Music Videos"
message:nil
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *actionAddProfilePhoto = [UIAlertAction
actionWithTitle:@""
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
//Do Whatever you want to do here
[alertMusicVideos dismissViewControllerAnimated:YES completion:nil];
}];
UIAlertAction *actionPlayNext = [UIAlertAction
actionWithTitle:@"Play Next"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
//Do some thing here
[alertMusicVideos dismissViewControllerAnimated:YES completion:nil];
}];
UIAlertAction *actionAddToUpNext = [UIAlertAction
actionWithTitle:@"Add to Up Next"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
//Do Whatever you want to do here when click this button
[alertMusicVideos dismissViewControllerAnimated:YES completion:nil];
}];
UIAlertAction *actionAddToPlayList = [UIAlertAction
actionWithTitle:@"Add To PlayList"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
//Do Whatever you want to do here when click this button
[alertMusicVideos dismissViewControllerAnimated:YES completion:nil];
}];
UIAlertAction *actionDeleteFromMyMusic = [UIAlertAction
actionWithTitle:@"Delete From My Music"
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction * action)
{
//Do Whatever you want to do here when click this button
[alertMusicVideos dismissViewControllerAnimated:YES completion:nil];
}];
UIAlertAction *actionCancel = [UIAlertAction
actionWithTitle:@"Cancel"
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction * action)
{
//Do Whatever you want to do here when click this button
[alertMusicVideos dismissViewControllerAnimated:YES completion:nil];
}];
[actionAddProfilePhoto setValue:[[UIImage imageNamed:@"yourProfile.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forKey:@"image"];
[alertMusicVideos addAction:actionAddProfilePhoto];
[alertMusicVideos addAction:actionPlayNext];
[alertMusicVideos addAction:actionAddToUpNext];
[alertMusicVideos addAction:actionAddToPlayList];
[alertMusicVideos addAction:actionDeleteFromMyMusic];
[alertMusicVideos addAction:actionCancel];
[self presentViewController:alertMusicVideos animated:YES completion:nil];
好了,你有没有尝试实现这一目标呢?请在您尝试使用您要显示的所有数据显示自定义视图的位置显示当前设置。 – luk2302
截至目前我正在做的是自定义的UIViewControllers,我已经设置了委托和东西。目前的Apple SDK没有提示他们如何做这个 –