0

I am having app in which I have used MMDrawer. I have made custom tabar with UIVIew and UIButtons. All UIButtons have UILabel at under it for showing which viewcontroller you are.

When i click on UIButton of custom tabbar the UILabel will not move with animation.

Here is my code

UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    SettingViewController *Help = [storyBoard instantiateViewControllerWithIdentifier:@"SettingViewController"];
    UINavigationController *detailNav = [[UINavigationController alloc]initWithRootViewController:Help];
    AppDELEGATE.drawer.centerViewController = detailNav;
[UIView animateWithDuration:0.5 animations:^{

        CGRect frame =   self.lblSplit.frame;
        frame.origin.x = sender.frame.origin.x - 10;
        self.lblSplit.frame = frame;
    }];


lblSplit is the UILabel which i want to move when UIButton Click.

Hasya
  • 9,792
  • 4
  • 31
  • 46
ios developer
  • 198
  • 19
  • The code in the animation block looks fine, the obvious thing is to set a breakpoint in the block and check the label is not nil. It’s difficult to help more unless I can see more code, e.g. where the label is created. – JingJingTao Jul 15 '16 at 13:10
  • this code is written in uibutton action and i want to move the label where clickable the button is. and also the move to viewcontroller with mmdrawer. i had coded just which i show. nothig else.and yes, label is put in tabbar(xib view) under first uibutton. – ios developer Jul 15 '16 at 13:18
  • If you're available, I'm in the iOS chat group, if possible post as much of your .m file in gist.github and share the link. – JingJingTao Jul 15 '16 at 21:59

0 Answers0