Iphone 缩放webview动画

Iphone 缩放webview动画,iphone,ios,uiwebview,calayer,cabasicanimation,Iphone,Ios,Uiwebview,Calayer,Cabasicanimation,我有一个尺寸为50x50(宽度和高度)的viewcontroller中的webview。我有一个按钮来缩放/拉伸webview的宽度和高度。因此,每当按下按钮时,我都想增加webview的高度和宽度。我想把这个和动画一起拍。 我尝试过使用以下代码,但它不起作用 CALayer* simple = [[CALayer alloc]init]; simple = webView.layer; CATransform3D currentTransform

我有一个尺寸为50x50(宽度和高度)的viewcontroller中的webview。我有一个按钮来缩放/拉伸webview的宽度和高度。因此,每当按下按钮时,我都想增加webview的高度和宽度。我想把这个和动画一起拍。 我尝试过使用以下代码,但它不起作用

        CALayer* simple = [[CALayer alloc]init];
        simple = webView.layer;
        CATransform3D currentTransform = simple.transform;
        CATransform3D scaled = CATransform3DScale(currentTransform, 1.5, 1.5, 1.5);
        simple.transform = scaled;
        [simple setNeedsDisplay];
请告诉我如何缩放网络视图。

试试这个

-(IBAction) incresethegeight:(id)sender
{



    [UIView animateWithDuration:2 delay:1.0
                        options:UIViewAnimationOptionBeginFromCurrentState
                     animations:^{ self.view.alpha = 1; }
                     completion:^(BOOL fin){[self  addHeight ];}];
}

-(void) addHeight
{  float height = webview.frame.size.height;

    CALayer* simple = [[CALayer alloc]init];
    simple = webview.layer;
    CATransform3D currentTransform = simple.transform;
    CATransform3D scaled = CATransform3DScale(currentTransform, 1.5, 1.5, 1.5);
    simple.transform = scaled;
    [simple setNeedsDisplay];
  // or  
//   [webview setFrame:CGRectMake(0.0f, 0.0f, 320, height +30)];


}

试着正确地解释这个问题。然后你们就可以得到你们的答案了。@Deepesh。请查找更新的问题检查