我有一个UITableView使用数组列出数据.这很好用.我还有一个用于在该tableview中搜索的UISearchBar.当tableviews数组中的数据匹配时,这些行将被添加到另一个可变数组中,而cellForRowAtIndexPath:则显示来自该可变数组的数据.
但是当我调用reloadData时,从不调用numberOfRowsInSection :. 因此,滚动时tableview崩溃,因为它试图从可变数组中获取数据,但是对于原始数组中的行(具有更多项)
我已经调试了很长一段时间,但不能为上帝的爱找到原因.Datasource和Delegate连接在tableview中,因为它可以显示原始数组中的数据.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
NSLog(@"isSearching: %d", isSearching);
// Return the number of rows in the section.
if(!isSearching)
return [originalArray count];
NSLog(@"isSearching - Return searchCopyListOfItems");
return [searchCopyListOfItems count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
if(!searching)
cell.textLabel.text = [originalArray objectAtIndex:indexPath.row];
else
cell.textLabel.text = [searchCopyListOfItems objectAtIndex:indexPath.row];
return cell;
}
Run Code Online (Sandbox Code Playgroud) Google Play 有一个名为“私人应用程序”的东西:https://support.google.com/googleplay/work/answer/6145139 ?hl=en
但是,据我了解,这意味着只有我组织的成员才能安装该应用程序。它没有说明“组织”的含义,但我假设它是 Google Workspace 或特定电子邮件域的成员。
我想实现类似于苹果“未列出的应用程序”的目标:https ://developer.apple.com/support/unlisted-app-distribution
这意味着该应用程序存在于应用程序商店中,但未列出或不可搜索。仅当您有该应用程序的链接时,您才可以下载它,并且用户将收到自动更新。
Google Play 上有类似的东西吗?我想通过 Google Play 分发和更新应用程序,但仅限于与我共享 URL 的用户。
在CocoaLibSpotify中,如何让SPLoginViewController存储凭据,以便用户以后可以通过[[SPSession sharedSession] attemptLoginWithStoredCredentials:]自动登录?