我無法通過NSInteger
發送到另一班級。這是我正在做的。將NSNumber發送給另一個班級方法 - 目標C
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [collectionView cellForItemAtIndexPath:indexPath];
NSInteger tag = cell.tag;
impact* myScript = [[impact alloc] init];
[myScript startProcess:tag];
}
我在這裏發送NSInteger
到衝擊的startProcess
方法。問題是,當發送過來,我得到以下錯誤:
No visible @interface for 'impact' declares the selector 'startProcess:'
但事實是我定義的startProcess
方法。
這裏是impact.h
文件:
-(NSInteger *)startProcess;
這裏是impact.m
文件:
#pragma mark - Table view delegate
- (void)startProcess:(NSInteger **)number {
[UITableView reloadData];
}
因此,要回顧一下,我想一個NSInteger
發送到另一個類的方法和比重新加載整個桌子。現在確定爲什麼我得到這個錯誤。
建議,想法?