0
在這裏,我用這個代碼在陣列中查看下一個值,如何查看以前的數組值上點擊
-(IBAction)changenext
{
static int j = 0;
if (j >arcount)
{
j = 0;
}
lb1.text=[NSString stringWithFormat:[artext objectAtIndex:j]];
imager.image=[arimage objectAtIndex:j];
aplayer=[[AVAudioPlayer alloc]initWithData:[arsound objectAtIndex:j] error:nil];
j++;
}
如何查看其他按鈕前一陣值單擊?請幫我解決。 。
itw工作,謝謝隊友:) – iosdev
好的答案,你也可以使用IB中按鈕的標籤屬性,並使用這些按鈕來區分按鈕,如果你不需要將它們聲明爲插座。 –