我需要改变MPMediaPickerController中图标的灰色颜色,当它们没有被选中时,背景是不透明的,就像褪色一样,我也需要删除这个。
我使用ios7.1和下一个代码在我的MPMediaPickerController上显示viewController元素。
- (IBAction)addSongs:(id)sender {
MPMediaPickerController *picker = [[MPMediaPickerController alloc]
initWithMediaTypes:MPMediaTypeMusic];
picker.delegate = self;
picker.allowsPickingMultipleItems = YES;
[self presentViewController:picker animated:YES completion:nil];
}
AppDelegate上的这段代码
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[UIView appearance] setTintColor:[UIColor whiteColor]];
return YES;
}
示例:
发布于 2014-03-17 09:47:16
这和MPMediaPickerController customize the colors of the labels and icons一样
……在应用程序代表中:
[[UIView appearance] setTintColor:[UIColor blueColor]];
该命令设置选项卡条、工具栏等的颜色色调--所有带有剪影图标的东西.你的标签条似乎在黑暗的窗口背景上是半透明的..。在我的应用程序中,我也使用mpmediapickercontroller,我获得了一个带有默认设置的全白色背景,因为移动到了IOS 7。我相信这是您的windows.backgroundcolor地雷设置为白色。
https://stackoverflow.com/questions/22134898
复制相似问题