我尝试做以下简单的事情:
NSArray * entities = [context executeFetchRequest:inFetchRequest error:&fetchError];
Run Code Online (Sandbox Code Playgroud)
没有什么花哨.但这在iOS 5中冻结,它在iOS 4中运行良好.我没有异常,警告或错误; 我的应用程序只是冻结.
请帮帮我!我快死了!;)
设置我的图案我有麻烦UIColor
.在iOS 5中它一切都很好,但在iOS 4.3中我遇到了问题.我添加了一个图像以便更好地理解.我已经谷歌搜索了一下,发现答案可能是opaque
属性的设置NO
.但我已经设置每隔view
,contentView
,backgroundView
,tableViewCell
它的opaque
价值NO
.
您可以看到分隔符颜色为黑色,其中图像具有透明度
我有两部mp4电影.一个具有实际视频,一个具有alpha值.我的目的是通过将第一部电影与第二部电影合并来获得透明外观,其中第二部电影将成为第一部电影的掩模.
我知道如何做到这一点:使用CGImage alpha和混合工具.但我不知道如何获得视频的确切帧.谁能指出我正确的方向?或者有人有另一种想法吗?
谢谢!
德赖斯
我正在CAGradientLayer
为我UIView
的每一个背景做一个,但我有一个小问题.渐变似乎不够平滑.颜色之间的过渡将呈现.你可以在这张照片中看到它.
这就是我在UIView的初始化程序中实现此渐变的方法.
CAGradientLayer *layer = [CAGradientLayer layer];
layer.colors = [NSArray arrayWithObjects:
(id)[[UIColor darkKinepolisColor] CGColor],
(id)[[UIColor lightKinepolisColor] CGColor],
(id)[[UIColor lightKinepolisColor] CGColor],
(id)[[UIColor darkKinepolisColor] CGColor],
nil];
layer.locations = [NSArray arrayWithObjects:
[NSNumber numberWithFloat:0],
[NSNumber numberWithFloat:0.4],
[NSNumber numberWithFloat:0.6],
[NSNumber numberWithFloat:1],
nil];
layer.startPoint = CGPointMake(0, 0);
layer.frame = self.layer.bounds;
layer.endPoint = CGPointMake(1, 1);
layer.contentsGravity = kCAGravityResize;
[self.layer addSublayer:layer];
Run Code Online (Sandbox Code Playgroud)
优秀的开发人员可以帮我解决这个问题吗?谢谢!