【发布时间】:2014-06-11 06:57:09
【问题描述】:
我有一个表格视图,其中列出了来自 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 行中有公司名称地址网站(我想成为链接)电话号码。和更多。
假设用户点击 Exibitor number 1,下一页将打开它将是一个包含所有信息的视图控制器。
【问题讨论】:
-
所以让我们总结一下,您有一个包含公司列表及其简短信息的表格视图。现在您希望当用户点击一行时,会出现一个新视图并显示公司的完整信息。就这样?
-
是的,就是这样......我知道它涉及一个数组,但我对此很陌生,所以任何帮助都会很好
-
您是来为您的阵列填充公司的吗?这部分你明白了吗?
-
不,我还在尝试这样做
-
为什么你甚至不能维护你的数据,但你想将它传递给另一个视图控制器?没有冒犯,但这样的问题证明您没有尝试或至少没有发现您的问题。
标签: ios parse-platform ios8