2012-06-13 90 views

回答

0
//Are you getting the image or not ... 
//if yes then just make the button action method let say...... 

changeImage:(id)sender{ 
    UIButton *btn = (UIButton*)sender 
    [btn setImage:yourUIImage forControlState:UIControleStateNormal]; 
} 
0

只是用波纹线的时候要更改按钮图像...

[yourButton setImage:[UIImage imageWithName:@"yourImageName"] forControlState:UIControleStateNormal]; 
0

首先分析这个字符串使用

NSArray *tempArry = [firstArryStr [email protected]".png"]; 

现在tempArray将包含图像names.In按钮操作可以使用索引(其为静态无功)中的ImageView迭代这个阵列和显示图像,如下所示:

UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"%@.png"],[tempArray objectAtIndex:index]]; 
index++; 

,并检查是否索引== [tempArray长度] ,然后将其重置为0.在UIImageView中使用此图像。

相关问题