任何人都可以帮我,我希望水平多次添加相同的图像,高度和宽度相同.重要的是我正在动态创建图像视图我想为所有图像使用相同的图像视图!这是图像
我想像这样横向制作
但是这样只需要一行.
我正在使用标签的摇动效果我在桌面视图中按下单元格时调用了动画但是它不起作用.如果我在cellForRowAtIndexPath中调用动画:(NSIndexPath*)indexPath它正在工作但是如果我在didSelectRowAtIndexPath中调用它:(NSIndexPath*)indexPath它不起作用.任何人都可以帮助我??? 提前致谢
-(void)shakeAnimation:(UILabel*) label {
const int reset = 5;
const int maxShakes = 6;
//pass these as variables instead of statics or class variables if shaking two controls simultaneously
static int shakes = 0;
static int translate = reset;
[UIView animateWithDuration:0.09-(shakes*.01) // reduce duration every shake from .09 to .04
delay:0.01f//edge wait delay
options:(enum UIViewAnimationOptions) UIViewAnimationCurveEaseInOut
animations:^{label.transform = CGAffineTransformMakeTranslation(translate, 0);}
completion:^(BOOL finished){
if(shakes < maxShakes){
shakes++;
//throttle down movement
if (translate>0)
translate--;
//change direction
translate*=-1;
[self shakeAnimation:label];
} else …Run Code Online (Sandbox Code Playgroud)