最初は画面外にUITableView
ある があり、ボタンを押すと、ビューの中心点が右に移動し、テーブルビューが画面に戻ります。Facebookのメニューに似ています。
//Slide in Side Menu
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:.75];
self.view.center = CGPointMake((cgSize.width/2)+10, 165);
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
[UIView commitAnimations];
私の問題は、テーブルビューの左上隅が負の数(画面外)のdidSelectRowAtIndexPath
場合、何らかの理由で起動せず、選択が無効になることです。
menuTableView = [[UITableView alloc] initWithFrame:CGRectMake(-350, 0, 350, cgSize.height-50)
style:UITableViewStylePlain];
-350 を 0 に変更すると、次のように完全に機能します。
menuTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 350, cgSize.height-50)
style:UITableViewStylePlain];
何か案は?