开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜