UITableView *tableView = (id)[self.view viewWithTag:1]; //why id is used here?
[tableView registerClass:[BIDNameAndColorCell class] forCellReuseIdentifier:CellTableIdentifier];
这是“开始iOS 6开发”一书中的一段代码,第8章,第245页。以下代码的含义是什么?为什么在这里使用“ID”?
我想知道为什么在这里“id”是必要的?
http://stackoverflow.com/questions/17385693/difference-between-casting-to-id-than-real-class-type-objective-c – viggio24