Search Results

Search found 1 results on 1 pages for 'ed94133'.

Page 1/1 | 1 

  • The right way to manage subviews in a UIControl

    - by ed94133
    (iPhone SDK 3.x:) I have a UIControl subclass that creates a different number of subviews depending on the length of an NSArray property. Please take my word for it that this needs to be a UIControl rather than a UIView. Currently I implement subview management in drawRect, beginning by removing all subviews and then creating the appropriate number based on the property. I don't think this is very good memory management and I'm not sure if drawRect is really the appropriate place to add subviews. Any thoughts on the best way to handle this pattern? Thank you.

    Read the article

1