ダッシュボードアプリに見られる波及効果をiPhoneに持ち込もうとしています。私の考えは、レイアウト ビューにボタンを配置するたびに、ボタンの周りに波及効果があるはずです。ただし、ビュー全体に波及効果をもたらすことはできますが、効果が必要なのはボタンの周りだけです。どこで間違ったのかわかりません。次のコードを試しました。
LayoutButton *tempLayoutButton=[[LayoutButton alloc] initWithObject:object];
tempLayoutButton.center=copyImage.center;
[layoutView addSubview:tempLayoutButton];
CALayer *templayer=[CALayer layer];
tempLayoutButton.layer.masksToBounds=NO;
templayer.frame=CGRectMake(0,0,50,50);
[tempLayoutButton.layer addSublayer:templayer];
CATransition *animation = [CATransition animation];
animation.delegate = self;
animation.duration = 1.0f;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
animation.type = @"rippleEffect";
[templayer addAnimation:animation forKey:@"animation"];
[tempLayoutButton release];
[tempLayoutButton.layer addSublayer:templayer];
templayer を LayoutView レイヤーに置き換えると、ビュー全体から波及効果が見られます。誰か解決策を教えてくれませんか
前もって感謝します