iphone - iOS Storyboard Modal Segues and Memory -


my apps "short" description:

basically interactive storybook, have class sets audio session , audio player every other class(viewcontrollers) in app imports , calls function or 2 set right sound played each time happens(for instance.. user reads story). each viewcontroller has it's own .m , .h classes , uses them animations , action handling. app 60 mb's in size (audio/images/code).

now these viewcontrollers set in storyboard (they 13 now) , modal segued 1 next 1 , programmatically dismissed go back.

when run app on ipad now, i'm starting memory warnings , yes instruments showing me app adding 40 mb's every viewcontroller segue to.

my questions are:

  1. do reside in real memory no matter do? (i thought wasn't holding strong pointers these view controllers).
  2. is there easy way me dismiss 1 controller , still use modal segue next one?(ran troubles trying this)
  3. modal segues not way should doing things in app they?!. looked nice , easy "storybook", giving me rough time.
  4. any other tips can give me described appreciated.

thank you.

  1. yes, long present modally. presenter view controller keeps strong pointer presented view controller. here in viewwilldisappear: release images , other views might use memory !
  2. you instantiate view controller using method instantiateviewcontrollerwithidentifier: , presentviewcontroller:animated:completion: view controller
  3. it's decide. mimic animation if wanted to.
  4. if understood correctly go singleton class kinda 'audioengine' accessible anywhere in class. design viewcontrollers in storyboard did. when need present modally view controller, i'll using answer of 2nd question. if still had memory issue, try cheat , keeps 3 view controllers (like uiscrollview's infinite scroll) reuse , i'll mimic modal presentation using uiview's animation blocks.

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -