hiding and displaying uitoolbar on same button click
I have an button on UIT开发者_高级运维oolbar. i need to display another toolbar on clicking that button and upon same button click , it must be hide. I am able to display toolbar but how to hide the toolbar on same button click?? help me!!
Use the tag
property of your button.
if(myButton.tag = 0) // means Do hide
{
myToolBar.hidden = YES;
myButton.tag = 1;
}
else
{
myToolBar.hidden = NO;
myButton.tag = 0;
}
How do you hide? If you use hidden: YES
just change it to hidden: NO
精彩评论