English 中文(简体)
制图网图像 观点
原标题:animating an image in UIWebView

我看到这种情况出现在单页上,他们基本上在国歌网中的形象。 观点,然后,当你掌握自己给你带来的形象时,你可以pin。 我的问题基本上在于如何像他们一样创造悲观,他们似乎在国歌上的形象。 观点ated淡。 如果你有一张照片,就试图通过纸板进入你的面板,打上图像,你看着我所说的话。 下面是初步和最后意见的简介:

enter image description here enter image description here

Usually in a web view those image are stored as links and some downloading needs to be performed to extract that image and add a gesture recognizer to it. How do they do it so fast?

问题回答

The part of the UI you are talking about (the top with the image) is not a UIWebView. It is there own custom UIView of some sort showing a teaser of the content. The bottom faded out part is a UIWebView of the original article.

I imagine the way the implemented it would be to have a tap gesture recognizer on the image and when the tap occurs animating the scaled down version of the image to the full size of the screen.

处理主食的守则可能照此办理(非常简单):

-(void)_imageTapOccured:(UITapGestureRecognizer *)gesture {
    [UIView animateWithDuration:2.0 animations:^{
        imageView.frame = CGRectMake(0.0f, 0.0f, widthOfScreen, heightOfScreen);
    }];
}

Then they will also likely handle the tap to change the picture back to the original size:

-(void)_imageTapAtFullScreen:(UITapGestureRecognizer *)gesture {
    [UIView animateWithDuration:2.0 animations:^{
        imageView.frame = originalRectSize;
    }];
}




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签