iphone - When to subclass UIViewController for custom subview? -


I have applied a custom code as the UIViewController subclass, but this could possibly be implemented As could be the UIView subclass.

When should I subclass UIView instead of UIViewController for a subview? UIViewController ?

There are any drawbacks for subclassing, when I need something to go on important logic, I In addition to this, if I am looking for some behavior that you get from the UIViewController , it is presented in the original or in the navigation controller, in addition to a UIViewController subclass. do.

If you are doing something quite simple or light, then UIView subclasses is usually enough. I think that the custom buttons and table view cells make me the most often use is done.

In my experience, I can see the UIViewController from UIView subclasses, but this may not be the best, it just happens to me straight-up Instead of using scene controllers, it feels a little more comfortable.

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -