小编gov*_*mar的帖子

如何使圆形视图与桨碰撞

每当圆形视图与故事板上的桨碰撞时,它实际上与视图的矩形框架碰撞.我该如何解决这个问题.我也试过了UIBezierPath,CAShapeLayer似乎没有用.

红色箭头是碰撞点,因为它似乎没有与球碰撞,而是与视图的框架碰撞.一次,用拨片触摸框架,它会反弹,等等.

屏幕快照

storyboard uiview ios uikit-dynamics swift

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

Xamarin.iOS应用程序项目App无法识别GoogleService-Info.plist

我正在尝试为Xamarin.iOS app.i实施Google登录.已添加登录process.had设置AppDelegate所需的Google登录程序包,将GoogleService-Info.plist添加到Xamarin.iOS应用程序项目.当我运行构建时,它会在下面显示错误.

[Firebase/Core] [I-COR000012]找不到配置文件:'GoogleService-Info.plist'.

配置Google上下文时出错:无法完成操作.(com.google.greenhouse错误-3.)

xamarin.ios ios xamarin.forms google-signin

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

像 UIActivityIndi​​catorview 一样对 UIBezierPath 六边形进行动画处理

我正在尝试实现与下面所示完全相同的动画

在此输入图像描述

我使用 UIBezierPath 和 CABasicAnimation 的输出如下。

在此输入图像描述

这是我的LoaderView代码

class LoaderView: UIView {

private let lineWidth : CGFloat = 5
internal var backgroundMask = CAShapeLayer()


override init(frame: CGRect) {
    super.init(frame: frame)
    setUpLayers()
    createAnimation()
}


required init?(coder: NSCoder) {
    super.init(coder: coder)
    setUpLayers()
    createAnimation()
}

func setUpLayers()
{
    backgroundMask.lineWidth = lineWidth
    backgroundMask.fillColor = nil
    backgroundMask.strokeColor = UIColor.blue.cgColor
    layer.mask = backgroundMask
    layer.addSublayer(backgroundMask)
}

func createAnimation()
{
    let animation = CABasicAnimation(keyPath: "strokeEnd")
    animation.fromValue = 0
    animation.duration = 1
    animation.repeatCount = .infinity
    backgroundMask.add(animation, forKey: …
Run Code Online (Sandbox Code Playgroud)

cabasicanimation cashapelayer ios uibezierpath swift

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