Buttons and Subviews

After anĀ embarrassingĀ about of hours spent trying to get my UIButton to function properly from within a subview, I finally came across this post:

“By having your view controller’s view inserted in another view, you are fighting against the way the UI kit is designed. It is intended to have view controllers manage a view that covers the entire screen, and have those view controllers pushed onto a navigation controller or managed by a tab view.

Your view controller is probably not being retained, and is being deallocated, or at least it’s views are being unloaded.”- Duncan C. from WareTo

Note to self: From now on, make sure you don’t release a view before applying subviews and their actions. (buttons)

Still quiet here.sas

Leave a Response