ios - Need assistance regarding transitionFromView:toView:duration:options:completion: -


regarding transitionfromview:toview:duration:options:completion: apple doc says in last few lines:

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.

if viewcontroller has 2 full screen size views display 1 @ time no issues:

[transitionfromview:self.view toview:self.view2...

but means it responsibility update view controller appropriately handle change?

if this:

secondviewcontroller *svc = [[secondviewcontroller alloc]init]; [transitionfromview:self.view toview:svc.view... 

how responsibility update view controller appropriately handle change? or how update viewcontroller?

update

i created single view projec, add secondvc in firstvc on button tap did this:

self.svc = [[secondvc alloc]init];   [uiview transitionfromview:self.view toview:self.svc.view duration:1.0 options:uiviewanimationoptiontransitionflipfromleft completion:^(bool finished) {}]; 

... secondvc viewdidload working nslog working.

then how handle updating of viewcontroller?

the statement "it responsibility update view controller appropriately handle change." meant have appropriately call view hierarchy delegate methods such as:

- (void)viewdidload; - (void)viewdidunload; - (void)viewwillappear; - (void)viewdiddisappear; 

and other methods responsible proper view management.

here some examples.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -