Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It should be easy enough to achieve — create a UIImageView holding the thing, set contentMode to UIViewContentModeCenter, then use a CoreAnimation block to animate a change in the frame from being of zero width/height and centred to being the full area you want to cover.</p> <p>E.g.</p> <pre><code>/* coming into here, imageView is a suitable UIImageView, frameToFill is a CGRect describing the area the image view should cover when fully unfurled */ // set up image view: content mode is centre so that the current // frame doesn't affect image sizing, and we'll be keeping the same // centre throughout so it won't move. The initial frame is on the // centre and of zero size. The view contents are clipped to the view's // bounds so that the changing frame does actually cut off the image imageView.contentMode = UIViewContentModeCenter; imageView.frame = CGRectMake(frameToFill.origin.x + frameToFill.size.width*0.5f, frameToFill.origin.y + frameToFill.size.height*0.5f, 0.0f, 0.0f); imageView.clipsToBounds = YES; // set up an animation block, lasting 3 seconds, in which the // only thing animated is the view's frame, expanding back out // to the original [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:3.0f]; imageView.frame = frameToFill; [UIView commitAnimations]; </code></pre> <p>The edge of your view will be hard and rectangular. If you want anything more subtle, you're probably not going to be able to achieve it with CoreAnimation; dropping down to the CoreGraphics level is probably the order of the day.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload