Mic*_*cky 5 animation resize frame uiwebview
我想知道是否有办法动画UIWebView的大小和位置.如果我这样做:
[UIView animateWithDuration:1.0 animations:^{
self.frame = CGRectMake(20.0, 20.0, 80.0, 80.0);
}];
Run Code Online (Sandbox Code Playgroud)
要么
[UIView beginAnimations:@"zoomIn" context:nil];
[UIView setAnimationDuration:2.75];
[UIView setAnimationDelegate: self];
self.frame = CGRectMake(20.0, 20.0, 80.0, 80.0);
[UIView commitAnimations];
Run Code Online (Sandbox Code Playgroud)
虽然有一个灰色的盒子在做动画,但WebView的内容会在没有动画的情况下立即切换到新的大小.(scalesPageToFit属性设置为YES)
有什么建议吗?
尚未破解文本宽度的即时更改,但您可以通过以编程方式将 UIWebView 的背景更改为clearColor 来摆脱灰色框。由于某种原因,如果您通过 Interface Builder 执行此操作,则不起作用。
| 归档时间: |
|
| 查看次数: |
1660 次 |
| 最近记录: |