Note that there are some explanatory texts on larger screens.

plurals
  1. POUnwanted animations coming from nowhere
    text
    copied!<p>In my iOS app, I have some animations that seem to be coming out of nowhere. They don't happen at first, only after using the app a little. Here is a Youtube video with a better description:</p> <p><a href="http://www.youtube.com/watch?v=whfG67EP6kk" rel="nofollow">http://www.youtube.com/watch?v=whfG67EP6kk</a></p> <p>I'm not really sure why the elements are animating the way they are (or at all). The code I'm calling is just a simple [view addSubView:viewname]. Any help as to how this is happening and how to prevent it would be great.</p> <p><strong>EDIT</strong> Here is the code for the text that comes flying in from seemingly all directions:</p> <pre><code>-(void)displayPublicDataForEntry:(PFObject *)entry likes:(unsigned long)likesCount comments:(unsigned long)commentsCount { [indicator stopAnimating]; [indicator removeFromSuperview]; [zippingLabel removeFromSuperview]; entryStatus.text = @"This entry is public"; entryStatus.backgroundColor = [UIColor clearColor]; entryStatus.frame = CGRectMake(10, 3, 200, 20); [shareView addSubview:entryStatus]; // Display a UILabel of number of likes if (likesCount == 1) numberOfLikes.text = [NSString stringWithFormat:@"%lu like", likesCount]; else numberOfLikes.text = [NSString stringWithFormat:@"%lu likes", likesCount]; CGSize stringsize = [numberOfLikes.text sizeWithFont:[UIFont systemFontOfSize:14]]; numberOfLikes.frame = CGRectMake(10, 22, stringsize.width, 20); numberOfLikes.backgroundColor = [UIColor clearColor]; [shareView addSubview:numberOfLikes]; // Display a UILabel of number of comments if (commentsCount == 1) numberOfComments.text = [NSString stringWithFormat:@" / %lu comment", commentsCount]; else numberOfComments.text = [NSString stringWithFormat:@" / %lu comments", commentsCount]; numberOfComments.frame = CGRectMake(numberOfLikes.frame.size.width + 10, 22, 100, 20); numberOfComments.backgroundColor = [UIColor clearColor]; [shareView addSubview:numberOfComments]; viewEntry.frame = CGRectMake(self.view.frame.size.width - 95, 12, 100, 40); [viewEntry addTarget:self action:@selector(viewPublicEntry) forControlEvents:UIControlEventTouchUpInside]; [shareView addSubview:viewEntry]; } </code></pre> <p>There's nothing in there (at least I don't think there is) that would cause these strange animations.</p>
 

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