Guest User

Untitled

a guest
Aug 15th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. Content doesn't change correctly on a UIView
  2. SecondView *sview=[[SecondView alloc] init];
  3. [self.view addSubview:[sview view]];
  4. sview.view.layer.cornerRadius=20;
  5. CGRect rect=sview.view.frame;
  6. CGRect bound=sview.view.bounds;
  7. [sview.view setFrame:CGRectMake(rect.origin.x, btn.frame.origin.y, rect.size.width, 0)];
  8. [sview.view setBounds:CGRectMake(0, 0, bound.size.width, 0)];
  9. [UIView beginAnimations:nil context:nil];
  10. [UIView setAnimationDuration:1];
  11. [sview.view setFrame:CGRectMake(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height)];
  12. [sview.view setBounds:CGRectMake(0, 0, bound.size.width, bound.size.height)];
  13. [sview.view setTag:10];
  14. [UIView commitAnimations];
  15.  
  16. sview.view.transform = CGAffineTransformMakeScale(0.01, 0.01);
  17.  
  18. [UIView beginAnimations:@"animations" context:NULL];
  19.  
  20. sview.view.transform = CGAffineTransformMakeScale(1.0, 1.0);
  21.  
  22. [UIView commitAnimations];
Add Comment
Please, Sign In to add comment