How do you animate a UIWebView in swift? -
i'm looking in swift, don't know how write in swift:
webview.frame = cgrectmake(somex, self.view.frame.size.height, somewidth, someheight); webview.hidden = no; [uiview animatewithduration:1.0 animations:^{ webview.frame = cgrectmake(somex, self.view.frame.size.height/2, somewidth, someheight); }];
here swift code above obj-c code:
webview.frame = cgrectmake(somex, somey, somewidth, someheight) webview.hidden = false uiview.animatewithduration(duration, delay: 0.0, options: uiviewanimationoptions(animationcurve), animations: { () -> void in webview.frame = cgrectmake(somex, someothery, somewidth, someheight) }, completion: {(finished) -> () in // can leave empty })
that should in swift.
Comments
Post a Comment