开发者

hiding and displaying uitoolbar on same button click

开发者 https://www.devze.com 2023-03-05 20:33 出处:网络
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 t

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

0

精彩评论

暂无评论...
验证码 换一张
取 消