• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Button on side menu not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • RE: Button on side menu not working
      • From: Julius Oklamcak <email@hidden>
  • Prev by Date: Re: UIScrollView to UIImage
  • Next by Date: RE: Button on side menu not working
  • Previous by thread: Re: when __bridge isn't required
  • Next by thread: RE: Button on side menu not working
  • Index(es):
    • Date
    • Thread