小编Vla*_*vík的帖子

UIColor的默认色彩空间是什么?

在初始化UIColor类中的实例时,我找不到描述RGB值应使用哪个颜色空间的文章或文档.

在ios应用程序中获得正确颜色的文章说我们应该使用Generic RGB.另一方面,我发现有几篇帖子说我们绝对应该在iOS上使用sRGB.

似乎默认的颜色空间是sRGB,如CGColorSpace Reference中所述

一个新的色彩空间在iPad Pro和iPhone 7.在现有的图像资源的配置文件必须被转换成显示P3使用所谓的"显示P3".对于Digital Color Meter应用程序,必须选择P3配置文件才能获得"显示P3"RGB值.查看截图.

如何为Display P3色彩空间选择正确的RGB值. 在此输入图像描述

rgb uicolor srgb ios

17
推荐指数
2
解决办法
4071
查看次数

Xcode 项目中多个目标的特定关联域

我在 Xcode 中有几个目标。每次我更改目标设置中的域时:目标 - 目标名称 - 功能 - 关联域

然后此更改也会传播到其他目标的设置。

对我来说,这似乎是 Xcode 中的一个错误。

Xcode 版本:10.0 (10A255)

xcode xcode-project ios-universal-links associated-domains

10
推荐指数
1
解决办法
1364
查看次数

如何在AVPlayerViewController中禁用音频和字幕设置

我想从播放器(iOS8,iOS9)中删除音频和字幕设置按钮:

AVPlayerViewController播放器的控件

播放器的控制器初始化:

            - (void) configureMoviePlayer {


                if(self.moviePlayerController == nil) {

                    self.moviePlayerController = [[AVPlayerViewController alloc] init];

                    [self.view setTranslatesAutoresizingMaskIntoConstraints:NO];
                    [self.moviePlayerController.view setTranslatesAutoresizingMaskIntoConstraints:NO];

                    [self.view addSubview: [self.moviePlayerController view]];

                    NSDictionary *views = @{ @"selfview" : self.view, @"movieControllerView" : [self moviePlayerController].view};

                    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[movieControllerView]|"
                                                                                      options:0
                                                                                      metrics:nil
                                                                                        views:views]];
                    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[movieControllerView]|"
                                                                                      options:0
                                                                                      metrics:nil
                                                                                        views:views]];
                }

            }
Run Code Online (Sandbox Code Playgroud)

收到流URL时,它将被传递到新的播放器实例:

 self.moviePlayerController.player = [AVPlayer playerWithURL:self.contentUrl];
 //self.moviePlayerController.showsPlaybackControls = YES;
 if([self.moviePlayerController respondsToSelector:@selector(allowsPictureInPicturePlayback)]) {                             

    self.moviePlayerController.allowsPictureInPicturePlayback = YES;
}
Run Code Online (Sandbox Code Playgroud)

WWDC视频中的示例不包含该按钮。有没有一种方法可以仅禁用单个按钮,或者获取默认工具栏按钮的数组并禁用特定按钮。

ios avplayerviewcontroller

5
推荐指数
1
解决办法
1051
查看次数

如何删除iPad模拟器中的灰色底栏

我试图重置模拟器,更改键盘输入设置,旋转模拟器,但它没有改变任何东西.

灰色栏覆盖我的ui,因此模拟器不可用.

XCode版本:7.1(7B91b)模拟器版本:9.1(SimulatorApp-635.5)

在此输入图像描述

xcode ipad ios ios-simulator xcode7

4
推荐指数
2
解决办法
1万
查看次数