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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to