ios - Is the design of being able to push indefinite view controllers on a navigation stack acceptable? -


if inside app, can push (a, b , c represent view controllers): -> b -> c -> b -> c -> b ....., can go forever, acceptable design pattern?

this may seem silly , obvious question have app called "taobao" (china's biggest, famous online shopping app) alibaba group (owned china's richest man), described above. in app can go -> b -> c -> b -> c -> b .....then if need go need go many times go deeper, means view controllers pushed on stack during navigation.

since alibaba group trusty tech company believe navigation pattern there reason. common sense tells me not pattern want hear experienced guys. thanks!

generally can push makes sense app. there 1 (pretty obvious condition) - not push controller on top of stack.

but there big but! if stack can infinite have keep in mind navigationcontroller stack stored in memory! adding more , more controllers on stack without releasing of them end up, sooner or later, memory crash. that's why cannot use simple pushviewcontroller method. can reconsider setviewcontrollers along other helpers keep stack @ reasonable size. or limit specific number based on memory usage observation. believe there plenty of options growing memory point should keep in mind.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -