Hi,
The following code which i used to show the view on click and hide when i clicks again,It works fine, But when Click again and again the view not hide any more and simply stays in the view.
- (IBAction)didTapFlag:(id)sender
{
checkBtnCondition=YES;
menuView.hidden=YES;
if([audioPlayer isPlaying])
{
[self playPauseAudio];
}
if( iscommentOn==NO)
{
[mCommentView hide];
iscommentOn=YES;
}
else
{
iscommentOn=NO;
if(iscommentOn)
if(![commentPlayer1 isPlaying])
{
iscommentOn=NO;
}
if(!iscommentOn)
{
iscommentOn=YES;
if(mCommentView)
{
[commentPlayer1 stop];
commentPlayer1 = nil;
[mCommentView hide];
return;
}
float comx;
float comy;
if(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad)
{
comx = 200;
comy = 280;
}
else
{
comx = 50;
comy = 170;
}
mCommentView = [[CommentUtility alloc] initWithFrame:CGRectMake(comx, comy, 330, 250)];
[mCommentView setDelegate:(id)self];
[self.view addSubview:mCommentView];
[mCommentView show];
}
}
}
What Change should I want to in my code, Any thing wrong with my code.
Please help me out.
AVADHESH PATEL
05-Jun-2013