Button on side menu not working
Button on side menu not working
- Subject: Button on side menu not working
- From: Devarshi Kulshreshtha <email@hidden>
- Date: Sun, 28 Jul 2013 23:35:24 +0530
I am able to implement side menu functionality using below code:
-(IBAction)menu:(id)sender
{
if (!_menuView) {
_menuView=[[MenuWidget alloc]init];
_menuView.view.frame=CGRectMake(-160,0,160,440);
[self.view addSubview:_menuView.view];
[self.view sendSubviewToBack:_menuView.view];
_menuView.view.userInteractionEnabled = YES;
}
if(self.widgetFlag==0){
// menuView.view.frame=CGRectMake(-160,20,160,548);
self.view.frame=CGRectMake(0, 20, 320, 548);
[UIView animateWithDuration:0.5
animations:^{
self.view.frame=CGRectMake(160, 20, 320,
548);
//
menuView.view.frame=CGRectMake(0,20,160,548);
}];
self.widgetFlag=1;
}
else{
self.view.frame=CGRectMake(160, 20, 320, 548);
// menuView.view.frame=CGRectMake(0,20,160,548);
[UIView animateWithDuration:0.5
animations:^{
self.view.frame=CGRectMake(0, 20, 320,
548);
//
menuView.view.frame=CGRectMake(-160,20,160,548);
}];
self.widgetFlag=0;
}
}
It is working properly, but only problem is:
> Button added on _menuView.view is not responding to associated action.
Please suggest if I am missing anything.
--
Thanks,
Devarshi
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden