iphone - rightBarButtonItem.enabled removes my custom layer from the uinavigationbar -
i've customized custom uinavigationbar show custom image (actually crossfade between lots of images on nstimer) :
- (void) displayimage:(egoimageview*)animageview { cabasicanimation *crossfade = [cabasicanimation animationwithkeypath:@"contents"]; crossfade.duration = 0.5; crossfade.fromvalue = self.layer.contents; crossfade.tovalue = (id)[self imagefromview:animageview].cgimage; [self.layer addanimation:crossfade forkey:@"animatecontents"]; self.layer.contents = (id)[self imagefromview:animageview].cgimage; }
how prevent navigationbar loose custom layer when enabling or disabling barbuttonitem? navigation bar goes it's default state after following line in vc executed:
self.navigationitem.rightbarbuttonitem.enabled = !editing;
(it reverts uibarstyleblackopaque i've set in vc's viewdidload)
when working on custom navbar found useful how iphone apps instagram/reeder/dailybooth implement custom navigationbars variable width buttons?
it goes across how make custom navbar, , later on talks past post, make custom button. full post can found here. found these useful in current project. either explain why it's happening method, or give alternative method use, if can't find solution current method of using crossfade , nstimer
Comments
Post a Comment