0
我想隱藏我的工具欄,如果我點擊一個按鈕,但它似乎不工作。我可以用動畫隱藏工具欄,但我不能讓它再次顯示。謝謝!工具欄sethidden = TRUE,sethidden = FALSE
- (IBAction)hideTheToolBar{
//[toolBar setHidden:YES];
if (toolbar.hidden == NO)
{
[UIView animateWithDuration:0.25 delay:0.0
options:UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction
animations:^(void)
{
toolbar.alpha = 0.0f;
}
completion:^(BOOL finished)
{
toolbar.hidden = YES;
}
];
}
if (toolbar.hidden == YES) {
toolbar.hidden = NO;
}
}
嘗試還設置Alpha回到1 – Demz 2012-03-28 09:52:45