ios - navigationBar change titleView with animation -
i change content of titleview in navigationbar display different kinds of information, instance uisegmentedcontrol or uilabel. change of information should done transition (segmentedcontrol fades out , label fades in).
i tried add multiple uiviews in titleview , animate alpha value, it's not working.
[self.navigationitem.titleview addsubview:_mainsegmentedcontrol];
so tried change content during animation since value can't animated called immediately:
[uiview animatewithduration:0.2 animations:^{ _filtersegmentedcontrol.alpha = 0.0f;} completion:^(bool finished) { [uiview animatewithduration:0.3 animations:^{ self.navigationitem.titleview = _mainsegmentedcontrol; _mainsegmentedcontrol.alpha = 1.0f; }]; }];
any suggestions?
Comments
Post a Comment