xbmc / Official-Kodi-Remote-iOS

Full-featured remote control for XBMC Media Center. It features library browsing, now playing informations and a direct remote control.
Other
221 stars 104 forks source link

long press on iPad doesn't work after searching #170

Closed kambala-decapitator closed 3 years ago

wutschel commented 3 years ago

Just played around with the search on iPad simulator. For me the longpress does not work when I apply it on a filtered list while the search is active. After I pressed Cancel (right side of the search bar) longpress on list items works again. Is this what you are seeing as well?

wutschel commented 3 years ago

The code is active, the action sheet is built up, even the origin (selectedPoint) is ok. The action sheet is just not visibly presented (DetailViewController.m, end of handleLongPress). Btw, same bug still exists with the UIAlertView PR.

if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
    [action showInView:self.view];
}
 else{
    [action showFromRect:CGRectMake(selectedPoint.x, selectedPoint.y, 1, 1) inView:self.view animated:YES];
}

With the following change it works:

UIView *myview = [self.view superview];
[action showFromRect:CGRectMake(selectedPoint.x, selectedPoint.y, 1, 1) inView:myview animated:YES];

Is this the proper fix? Or is something wrong with the view for the filtered list? I am not aware of another action sheet which is required to use the super view when showing it on iPad´s DetailViewController.

wutschel commented 3 years ago

@kambala-decapitator, I am not sure if I should make above change. With the change the action menu is visible, but I am not sure if this the correct solution for the problem. Your comment is very appreciated.