Я хочу реализовать анимацию, ее вид с точки зрения начинает расширяться круговым и заполнять весь вид. Я выполнил следующий код, но он не заполняет точку зрения циркулярно. Есть идеи?Циклическая анимация
- (void)viewDidLoad {
[super viewDidLoad];
myView =[[UIView alloc]init];
myView.frame=CGRectMake(self.view.frame.size.width/2,self.view.frame.size.height/2+100, .1, .1);
myView.backgroundColor=[UIColor redColor];
[self.view addSubview:myView];
[self animate];
}
-(void)animate{
[UIView animateWithDuration:1.0
delay: 0.0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
[self setRoundedView: myView toDiameter:1000];
}
completion:nil];
}
-(void)setRoundedView:(UIView *)roundedView toDiameter:(float)newSize;
{
CGPoint saveCenter = roundedView.center;
CGRect newFrame = CGRectMake(roundedView.frame.origin.x, roundedView.frame.origin.y, newSize, newSize);
roundedView.frame = newFrame;
roundedView.layer.cornerRadius = newSize/2.0;
roundedView.center = saveCenter;
}
http://stackoverflow.com/a/10902063/4030971 - это поможет. Просто нужно внести некоторые изменения в соответствии с вашими требованиями. –