yoavlt / LiquidLoader

Spinner loader components with liquid animation
MIT License
1.32k stars 185 forks source link

Re: Swift 2 branch #6

Open pjebs opened 8 years ago

pjebs commented 8 years ago

When you resize/move the UIView after the initial frame has been set, the outer moving circle adjusts but the static circle stays at the initial locations.

Also, the swift 2 branch should become the main branch. Also there is a spelling mistake: "Grow" should be "Glow".

pjebs commented 8 years ago
override func viewDidLoad() {
    super.viewDidLoad()

loader = LiquidLoader(frame: CGRect(x: 50, y: 50, width: 100, height: 100), effect: .GrowCircle(UIColor.redColor()))

    loader!.translatesAutoresizingMaskIntoConstraints = false

    self.view.addSubview(loader!)

    let views: [String:AnyObject] = ["loader": loader!]

    view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|-[loader]-|", options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: views))
    view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-[loader]-|", options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: views))
pjebs commented 8 years ago

image image