title: Best practice for custom UIView subview strong vs weak
body: <p>So I am writing a custom class that inherits from UIView. I have a bunch of subviews, that I add. </p>
  
  <p>So run into 2 issues. IF I make the superview and subview references strong, the views are leaking. If I make them weak, they are not appearing at all. What am I doing wrong?</p>
  
  <h3>CustomUIView</h3>
  
  <pre><code>@interface CustomUIView : UIView
  @property(nonatomic, strong) AnotherCustomUIView *mySubView;
  @end
  
  @implementation CustomUIView {
  
  - (void)initCommon {
      self.mySubView = [self createSubView]
  }
  
  - (AnotherCustomUIView *) createSubView {
      return [[AnotherCustomUIView alloc] init:self];
  }
  
  @end
  </code></pre>
  
  <h3>AnotherCustomUIView</h3>
  
  <pre><code>@interface AnotherCustomUIView : UIScrollView
  @property (nonatomic, strong) CustomUIView *ownerView;
  @end
  
  
  @implementation AnotherCustomUIView
  
  - (id)init:(CustomUIView *) ownerView {
      self = [super init];
      if (self) {
          self.ownerView = ownerView;
          self.delegate = self;
      }
      return self;
  }
  
  @end
  </code></pre>