objective c - Overuse of NSView -> Alternatives? -
i having performance troubles app:
it takes more 2 seconds load -> straight away went apple documentation
in section named "avoid overuse of views" @ bottom got confused:
i indeed adding lot of nsviews
(guess overusing them).
" instead, should consider writing own custom classes can managed higher-level nsview
subclass. drawing code of nsview
subclass can optimized handle custom objects. "
my question is:
how can write own custom classes can managed higher -level nsview
subclass -> example ?
only thing thought calayer
.
is adding calayer
subclasses better adding nsview
? increase poor performance bit ?
or there new learn ?
edit:
currently have nsview
s adding 15 nsview
subview them , can add 15calayer
s instead :-/
have profiled app? before ripping view hierarchy apart, use instruments time profiler find out time being spent.
calayers more efficient uiviews, , recommended avoid using drawrect if don't need to, before resorting rewrite, need know app spending time.
Comments
Post a Comment