我刚刚开始编码,当我按照Apple的文章'Your Second iOS App:Storyboard'时,我收到一条警告,说明'不兼容的指针类型初始化Birdsighting * __ strong,表达式为NSString *',代码如下:
detailViewController.sighting = [self.dataController objectInListAtIndex:[self.tableView indexPathForSelectedRow].row];
答案 0 :(得分:0)
NSString * stringInCurrentTableViewRow = [self.dataController objectInListAtIndex:[self.tableView indexPathForSelectedRow] .row]; BirdSighting * yourObject = stringInCurrentTableViewRow;
你确定dataController不包含字符串;)