1
在我的應用程序中,我有4個圖像。我想在每次點擊時顯示不同的圖像。如何在每次點擊時顯示不同的圖像?每次點擊不同的圖像
我這裏單圖片代碼:
-(void)removeImageView
{
rightongbanner.image=Nil;
}
-(void)alertshow
{
rightongbanner.image=[UIImage imageNamed:@"correct.png"];
timer = [NSTimer scheduledTimerWithTimeInterval:2.5 target:self selector:@selector(removeImageView) userInfo:nil repeats:NO];
[aplayer play];
}
在rightongbanner.image
,我想表明在第一次點擊IMG2在第二次點擊IMG1。我怎樣才能做到這一點?
你可以增加每次點擊計數器並根據您可以顯示在圖像的UIImageView –