ios - transitionFromView:toView:duration:options:completion: confusion -
i trying utilize transitionfromview:toview:duration:options:completion: in uiview class reference point confusing me. means?
this method modifies views in view hierarchy only. not modify application’s view controllers in way. example, if use method change root view displayed view controller, responsibility update view controller appropriately handle change.
please view sample project https://anonfiles.com/file/521cbb41b086eae987fe27eb98278aba
in project called transitionfromview:toview:duration:options:completion:
, working fine , did nothing mentioned in above point.
you more asking explanation of apple's documentation specific question, if understand posting correctly.
nevertheless i'll give explanation , hope, you:
you write:
everything working fine..
and is, because doing here!
according mvc design pattern (model-view-controller), using classes uiviewcontroller (the "c") , uiview (the "v") in code.
a view contains visual representation of objects (like labels, buttons, subviews, ...) without logic behavior.
a viewcontroller provides logic, e. g. ibaction methods , other methods may implement.
each uiviewcontroller has own "view" property containing view, behavior controller manage. view contains additional views, e. g. labels, images , buttons. subviews , stored in view's "subviews" array property. btw, each view has such subviews property - is, how can implement complex view hierarchies.
in situation (multiple subviews managed 1 common viewcontroller), method
transitionfromview:toview:duration:options:completion:
hides "fromview" , unhides "toview" support of animations. transition between views. paragraph documentation shall prepare developer, method manages change of visual representation , not provide additional "services" view controller further management participating views.
that means, have manage e. g. state of views (which view provides interaction user) own code. it seems me, have managed well!
in wider scope, ios supports uiviewcontroller container - can contain child view controllers (which again contain view subviews). in such architecture, there transition method sdk,
transitionfromviewcontroller:toviewcontroller:duration:options:animations:completion:
which allows implement transitions not between 2 views, between 2 view controllers.
i hope not text , helps make things clearer you.
Comments
Post a Comment