Skip to content

Instantly share code, notes, and snippets.

NSString *assetsDir = [bundle pathForResource:@"assets" ofType:nil];
NSArray *assets = [fileManager directoryContentsAtPath:assetsDir];
for (NSString *asset in assets) {
NSString *bundleAsset = [assetsDir stringByAppendingPathComponent:asset];
NSMutableArray *locations = [app.destLang locationsForCategoryId:category.id];
if (locationsViewController == nil) {
locationsViewController = [[LocationsViewController alloc] initWithNibName:@"LocationsView" bundle:nil];
}
locationsViewController.title = category.name;
locationsViewController.categoryId = category.id;
[[self navigationController] pushViewController:locationsViewController animated:YES];
locationsViewController.locations = locations;
UITableViewCell *oldCell = [tableView cellForRowAtIndexPath:selectedIndexPath];
UITableViewCell *newCell = [tableView cellForRowAtIndexPath:indexPath];
//[UIView beginAnimations:nil context:nil];
oldCell.accessoryType = UITableViewCellAccessoryNone;
newCell.accessoryType = UITableViewCellAccessoryCheckmark;
//[UIView commitAnimations];
self.selectedIndexPath = indexPath;
[self performSelector:@selector(deselectRow) withObject:nil afterDelay:0.0];