Skip to content

Commit

Permalink
reverted actions on center screen due to issues on table cells coords
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni Messina committed Jun 10, 2012
1 parent 6f221e3 commit 8a146ae
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions XBMC Remote/DetailViewController.m
Expand Up @@ -774,15 +774,15 @@ -(void)showActionSheet:(NSIndexPath *)indexPath{
int numActions=[sheetActions count];
if (numActions){
NSDictionary *item = nil;
UITableViewCell *cell = nil;
// UITableViewCell *cell = nil;
if ([self.searchDisplayController isActive]){
item = [self.filteredListContent objectAtIndex:indexPath.row];
cell = [self.searchDisplayController.searchResultsTableView cellForRowAtIndexPath:indexPath];
// cell = [self.searchDisplayController.searchResultsTableView cellForRowAtIndexPath:indexPath];

}
else{
item = [[self.sections valueForKey:[[[self.sections allKeys] sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)] objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row];
cell = [dataList cellForRowAtIndexPath:indexPath];
// cell = [dataList cellForRowAtIndexPath:indexPath];
}

NSString *title=[NSString stringWithFormat:@"%@\n%@", [item objectForKey:@"label"], [item objectForKey:@"genre"]];
Expand All @@ -796,12 +796,12 @@ -(void)showActionSheet:(NSIndexPath *)indexPath{
[action addButtonWithTitle:[sheetActions objectAtIndex:i]];
}
action.cancelButtonIndex = [action addButtonWithTitle:@"Cancel"];
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
// if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
[action showInView:self.view];
}
else{
[action showFromRect:CGRectMake(cell.frame.origin.x + (cell.frame.size.width/2), cell.frame.origin.y - cell.frame.size.height/2, 1, 1) inView:self.view animated:YES];
}
// }
// else{
// [action showFromRect:CGRectMake(cell.frame.origin.x + (cell.frame.size.width/2), cell.frame.origin.y - cell.frame.size.height/2, 1, 1) inView:self.view animated:YES];
// }
}
}

Expand Down

0 comments on commit 8a146ae

Please sign in to comment.