MPMediaPickerController

MPMediaPickerController

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

我创建MPMediaPickerController的代码是:

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

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

例子:

提前致谢。

最佳答案

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

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

要更改所有视图(包括标签)的tintColor,可以在AppDelegate.m文件中执行以下操作:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [[UIView appearance] setTintColor:[UIColor yellowColor]];

    return YES;
}

09-07 05:50