每当圆形视图与故事板上的桨碰撞时,它实际上与视图的矩形框架碰撞.我该如何解决这个问题.我也试过了UIBezierPath,CAShapeLayer似乎没有用.
红色箭头是碰撞点,因为它似乎没有与球碰撞,而是与视图的框架碰撞.一次,用拨片触摸框架,它会反弹,等等.
我正在尝试为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.)
我正在尝试实现与下面所示完全相同的动画
我使用 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)