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

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -