我有一个表视图,列出来自parse.com类的数据,我想传递用户点击的数据,并在下一页的视图控制器中显示格式化的整行
- (id)initWithCoder:(NSCoder *)aCoder {
self = [super initWithCoder:aCoder];
if (self) {
// Customize the table
// The className to query on
self.parseClassName = @"Exibitor";
// The key of the PFObject to display in the label of the default cell style
self.textKey = @"name";
// The title for this table in the Navigation Controller.
self.title = @"Exhibitor";
// Whether the built-in pull-to-refresh is enabled
self.pullToRefreshEnabled = YES;
// Whether the built-in pagination is enabled
self.paginationEnabled = YES;
// The number of objects to show per page
self.objectsPerPage = 6;
}
PFQuery *query = [PFQuery queryWithClassName:@"Exibitor"];
//[query whereKey:@"playername" equalTo:@"Sean Plott"];
[query countObjectsInBackgroundWithBlock:^(int count, NSError *error) {
if (!error) {
// The count request succeeded. Log the count
NSLog(@"there are %d entries", count);
} else {
// The request failed
}
}];
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
[self setTitle:@"Exibitor List"];
// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
在Exibitor行中有comapny名称地址网站(我想成为链接)电话号码。和更多。
所以说用户点击Exibitor number 1下一页将打开它将是一个包含所有信息的视图控制器。
答案 0 :(得分:1)
只需将数组[row selected]结果传递给下一个视图控制器并解析您的详细信息以填充视图控制器。这也是用于填充tableview控制器的数组。其他任何事情让我知道