Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Based on the code shown and the behavior you see so far, here are my suggestions:</p> <ol> <li>Make sure the viewForMovie IBOutlet is connected properly in Interface Builder. If it's not connected properly (and so nil), nothing will appear. If you didn't mean to make it an IBOutlet in the first place, then you'll need to manually create it and add it as a subview to <code>self</code> before using it.</li> <li>Not sure why you have the viewForMovie UIView in the first place. Is this subview's class (let's call it MySubview) a subclass of UIView? You can just show the animation in <code>self</code> instead of adding another subview inside it. Are you going to add more uiviews to this subview besides the viewForMovie?</li> <li>To get rid of the "may not respond to" warning, declare the startAnimation method in the MySubview.h file (under the @property line):<br> <code>-(void)startAnimation;</code></li> <li>The fact that the warning says "<strong><em>UIView</em></strong> may not respond" also tells you that the parent view has declared newView as a UIView instead of MySubview (or whatever you've named the subview class). Change the declaration in the parent from <code>UIView *newView;</code> to <code>MySubview *newView;</code>.</li> <li>In the initWithImage, what is "viewForImage"? Is it a UIImage variable or something else?</li> <li>If all of the images are the same size and fit in the subview as-is, you don't need to set the frame--the initWithImage will automatically size the UIImageView using the init-image dimensions.</li> <li>Double check that the images you are referencing in the for-loop are named exactly as they are in the code and that they have actually been added to the project.</li> <li>Finally, you should release the objects you alloc in startAnimation. At the end of the method, add: <code>[imageArray release];<br> [animatedImages release];</code></li> </ol> <p>The only item, however, that I think is actually preventing the animation from appearing right now is item 1.</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. This table or related slice is empty.
    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