タッチ時にナビゲーションバーとタブバーを非表示にしてuitableviewに移動したい、コードを吹き飛ばしたい:viewForHeaderInSectionからの_headViewそれは問題ありません。ただし、ブロックが実行された後、_headView が表示される場合があります
if(_headView)
_headView.hidden = YES; //
[UIView animateWithDuration:0.5 animations:^{
scrollView.frame = rect;
_vc.navigationController.navigationBar.top -= navigationBarHeight;
tabView.top = SCREEN_HEIGHT;
} completion:^(BOOL finished) {
}];
非表示コードを完了ブロックに移動すると、正常に実行されますが、0.5秒後に非表示になり、ゆっくりです。
[UIView animateWithDuration:0.5 animations:^{
scrollView.frame = rect;
_vc.navigationController.navigationBar.top -= navigationBarHeight;
tabView.top = SCREEN_HEIGHT;
} completion:^(BOOL finished) {
if(_headView)
_headView.hidden = YES; //Delay after 0.5s.
}];
助けてください、ありがとう。