MPMediaPickerController自定义标签和图标的颜色 [英] MPMediaPickerController customize the colors of the labels and icons

查看:175
本文介绍了MPMediaPickerController自定义标签和图标的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在iOS 7上使用Xcode5更改MPMediaPickerController项目的标签颜色,我该怎么办?.

I need change the labels colors of MPMediaPickerController item, on iOS 7 , im using Xcode5, what can i do?.

我创建MPMediaPickerController的代码是:

- (IBAction)addSongs:(id)sender {
  MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeMusic];
  picker.delegate = self;
  picker.allowsPickingMultipleItems = YES;  
}

我正在尝试使用此方法,但没有用: https://gist.github.com/acidlemon/1955332

I was trying with this but not works: https://gist.github.com/acidlemon/1955332

示例:

谢谢.

推荐答案

使用外观代理更改标签栏的tintColor,例如:

Change your tab bar's tintColor using the appearance proxy, e.g.:

[[UITabBar appearance] setTintColor:[UIColor yellowColor]];

要更改所有视图(包括标签)的tintColor,可以在AppDelegate.m文件中执行以下操作:

To change the tintColor of all views, including your label, you can do the following in your AppDelegate.m file:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{    
    [[UIView appearance] setTintColor:[UIColor yellowColor]];

    return YES;
}

这篇关于MPMediaPickerController自定义标签和图标的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆