iphone - UINavigationBar change Tint color with animation -
is possible change tint animation smoother effect?
this doesn't work me:
[uiview beginanimations:nil context:nil]; [self.navigationcontroller.navigationbar settintcolor:[uicolor greencolor]]; [uiview commitanimations];
i not sure if possible using native apple components guess using cg generate gradient ... want find out before i'll start building own solution ...
cheers guys :)
you wouldn't believe length went through make possible; annoyed me no end isn't stock ios feature , transition of tintcolor ugly while animation push/pop viewcontroller smooth.
there'a lot of code checks when fade, , i've written class called pspdfnavigationappearancesnapshot preserve navigation state when being popped. (i got idea awesome nimbuskit)
the actual animation pretty easy:
[self.navigationcontroller.navigationbar.layer addanimation:pspdffadetransition() forkey:nil]; catransition *pspdffadetransition(void) { return pspdffadetransitionwithduration(0.25f); } catransition *pspdffadetransitionwithduration(cgfloat duration) { catransition *transition = [catransition animation]; transition.timingfunction = [camediatimingfunction functionwithname:kcamediatimingfunctioneaseineaseout]; transition.type = kcatransitionfade; transition.duration = duration; return transition; }
you can compact code more; it's snipped ios pdf library pspdfkit , use fade in various places, helper functions.
Comments
Post a Comment