开发者

Use push and pop navigation behavior reusing same view(s)

I have list of frames. Each frame has context for view(e.g. text frame, image frame) and has specific view for type of frame(viewText, viewImage). Length of list could vary and could be huge. One view is visible at time. User uses gestures to go through frames.

Can I implement navigation 开发者_运维知识库logic(pop, push effects) which allows to reuse same view instances for different frames?


You can use UIGestureRecognizers to handle the gestures, and [UIView + (void)transitionFromView:(UIView *)fromView toView:(UIView *)toView duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options completion:(void (^)(BOOL finished))completion] to do he animation. To maintain the stack navigation, just use an NSArray, if you don’t want to mess with UIViewControllers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜