我用一个故事板做一些非常简单的核心数据材料, 我能够用语气通过录影带, 但不知为什么,这个不让我做。
我试图用此调用 BlogDetailsViewcontroller
组成此类
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if (segue.identifier == @"User sBlogList2BlogDetails")
{
NSLog(@"this is self.users.sorted %@", self.user.sortedBlogs);
BlogDetailsViewController *bdvc = segue.destinationViewController;
bdvc.blog = [self.user.sortedBlogs objectAtIndex:self.tableView.indexPathForSelectedRow.row];
bdvc.temp = @" this is temp pass";
}
}
这里是 BlogDetailsViewCrecker
类
@class Blog;
@interface BlogDetailsViewController : UITableViewController
{
NSString *temp;
}
@property(nonatomic, strong) Blog *blog;
@property(nonatomic, strong) NSString *temp;
@end
@implementation
@synthesize blog, temp;
-(void)viewDidLoad
{
NSLog(@"%@,%@", blog, temp); //comes back as null for both !!
}
It worked fine for the other class, I did nothing different. Any suggestions?