quartz-core

    0热度

    1回答

    的面膜我要画这样 一个按钮,于是我就用CAGradientLayer,CAShapeLayer和UIBezierPath。像这样的代码: let gradientLayer: CAGradientLayer = CAGradientLayer.init() gradientLayer.startPoint = CGPoint.init(x: 0, y: 0.7) gradien

    1热度

    1回答

    我想在UIView中画一些虚线,但我不知道我是否正确地做。第一个破折号与其他破折号相比有一半的宽度。 代码: let strokeColor = UIColor.white.cgColor let path = UIBezierPath() path2.move(to: CGPoint(x: 0, y: 50)) path2.addLine(to: CGPo

    2热度

    1回答

    在处理Quartz事件时,我似乎无法找到关于什么事件0x1D,29的文档以及如何处理它。 我在这里,并在头文件的分类看... https://developer.apple.com/documentation/coregraphics/cgeventtype?language=objc 有问题的情况下使用触摸条和触控板时产生。 我的具体问题是点击捕捉触摸栏像转义软键。当用户触摸转义时,会触发0x1

    1热度

    2回答

    我用下面的代码: - (void)setMaskByRoundingCorners:(UIRectCorner)corners withCornerRadius:(float)radius { UIBezierPath* rounded = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorner

    0热度

    1回答

    突出显示的选择总是以相同的颜色显示,即使我在PDFView中更改了颜色(我正在使用OSX)。 所以我需要知道为什么以及如何修复这个错误? pdfSelection.color = myColor //a color choise by user pdfView.highlightedSelections?.append(pdfSelection)

    0热度

    1回答

    我申请cornerRadius通常以自定义视图这样: self.layer.cornerRadius = self.frame.size.height/2 然而,我注意到,在UIView产生的角被均匀涂抹。具体来说,如附图所示,顶部比底部更早开始淡入角落。在放大时,即使在正常的观看级别,也可以看到不平坦的转弯。 有没有人也遇到过这个问题能解决它?

    0热度

    1回答

    我想绘制一个渐变,在不透明状态下消失。 我看不出绘画效果。试图改变颜色。框架看起来是正确的。为什么不显示这种不透明消失? func createGradient() { let h = UIScreen.mainScreen().bounds.size.height let y = collectionView.frame.origin.y + (cellSize() *

    0热度

    2回答

    我在CAShapeLayer()上画了一些东西。现在我想把它放在另一层。 let layer = CAShapeLayer() // This is the layer I drew something on let imageView = UIImageView() // The imageView I want to put the layer on imageView.layer.add

    0热度

    1回答

    我有一个应用程序,它动态地从服务器拖动消息,滚动到顶部,旧邮件将被检索并显示在屏幕上,就像其他消息应用程序,但我的应用程序保持生成UIlabel,即使在检索完所有旧消息之后没有更多的旧消息出现,如果列表正在滚动,并且源自QuartzCore,负责的调用者是CA :: Render :: Shemem ::仍然会产生UIlabel :: new_shmem(无符号长整数)。 任何人都可以帮助我,我在

    0热度

    1回答

    我尝试用平行四边形路径填充shapelayer。 let shapeLayer = CAShapeLayer() shapeLayer.lineWidth = 2.0 shapeLayer.fillColor = UIColor.blue.cgColor shapeLayer.strokeColor = UIColor.black.cgColor let