ios - UIPageViewController with Images in iPad3 caches all viewcontrollers in memory -


in arc, have customised uipageviewcontroller mypageviewcontroller. adding mypageviewcontroller childviewcontroller rootviewcontroller. transition type set curl.

imageviewcontrollers added viewcontrollers of mypageviewcontroller this:

imageviewcontroller *startingviewcontroller1 = [self.storyboard instantiateviewcontrollerwithidentifier:@"imageviewcontroller"]; imageviewcontroller *startingviewcontroller2 = [self.storyboard instantiateviewcontrollerwithidentifier:@"imageviewcontroller"];  nsarray *viewcontrollers = @[startingviewcontroller1, startingviewcontroller2]; [self.mypageviewcontroller setviewcontrollers:viewcontrollers direction:uipageviewcontrollernavigationdirectionforward animated:no completion:null];  self.mypageviewcontroller.delegate = self; self.mypageviewcontroller.datasource = self.pagemodelcontroller; [self addchildviewcontroller: self.mypageviewcontroller]; [self.view addsubview: self.mypageviewcontroller.view]; [self.mypageviewcontroller didmovetoparentviewcontroller:self]; 

each imageviewcontroller has 4 different uiimageviews on it. these images can hd images, in order avoid caching, setting image using:

[uiimage imagewithcontentsoffile:] 

but each time turn page in pageviewcontroller, can see 15 mb increased memory , not going down, unless pop whole rootviewcontroller.

but happens in ipad3, whereas memory not increasing in ipad2. both has ios 7.1 installed.

to mypageviewcontroller, 2 viewcontrollers(imageviewcontroller) being added @ time using,

- (uiviewcontroller *)pageviewcontroller:(pmpageviewcontroller *)pageviewcontroller viewcontrollerbeforeviewcontroller:(uiviewcontroller *)viewcontroller; - (uiviewcontroller *)pageviewcontroller:(pmpageviewcontroller *)pageviewcontroller viewcontrollerafterviewcontroller:(uiviewcontroller *)viewcontroller; 

in viewdidunload of imageviewcontroller, setting every views & objects nil;

so guess that, ipad3 not releasing view controllers once added it, whereas ipad2 releases previous viewcontrollers , keeps current ones.

is same or there other workarounds this...

can me on please.. have been spending more week on issue now.. kind of suggestions more helpful..

sorry guys, mistake again. there photoframe image setting behind main image. imageview gets direct uiimage data. should have referred image path instead.

i didn't notice earlier. when changed uiimage imagewithcontentsoffile:, worked charm...


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -