In one of my project i'm using only a UIWebView. I need an animation (for example a flip) when I reload my webView with another content... Is it possible to create a flip animation (or something similar)? I must create a fake controller to get it? Solutions? Thanks
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
You can always do the
+transitionWithView:duration:options:animations:completion:
method with the web view.This method is basically a way of saying: "change the contents of this view, in animated fashion". So it takes an snapshot of the current state, performs the animation (be it a flip, curl, etc) and then inserts an snapshot of the new state.
But notice that I've used
UIViewAnimationOptionAllowAnimatedContent
, this forces the animation to not use a snapshot for the new state of the view, because settingloadHTMLString
does not change the view immediately, so we need to force it to use the live context of the view instead of a snapshot.The weather app in iOS (pre 7) uses a similar method for alternating between the current weather and the picker for other regions/options when clicking the "i" on the bottom.
I think that you don't need to create a controller for that. You can simply add something like that: