我聲明一個int值作爲我的imageIndexForSend通過myView類中的以下代碼。不能訪問一個int值
int imageIndexForSend;
@property int imageIndexForSend;
@synthesize imageIndexForSend;
在點擊一個按鈕後,我顯示一個PopOver calss的彈出窗口。 有一個在酥料餅class.when多個索引表視圖我酥料餅類表中點擊任何行它myViewClass
-(void)getImageForSend:(int)index{
imageIndexForSend = index;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
myView *obj = [[myView alloc] init];
[obj getImageForSend:indexPath.row];
[staticSceneController release];
}
設置MyView的類imageIndexForSend作爲
在酥料餅
然後我解散popover(popOver類)並在myViewClass中執行一些操作後返回myViewClass。
然後我點擊發送button.but整數值imageIndexForSend是zero.cant獲取我設置從PopUp的舊值。
任何人都可以告訴我一個方法來獲取舊imageIndexForSend value.may我知道我做了什麼錯誤。