title: xCode: Passing a Label text into a custom added subview
body: <p>I have rewritten this to try and make it more descriptive with more code hopefully:</p>
  
  <p>I have set up a separate <code>UIView</code> class called: pageTitleView code below:
  header file:</p>
  
  <pre><code> #import &lt;UIKit/UIKit.h&gt;
  
   @interface pageTitleView : UIView
      @property (nonatomic, strong) IBOutlet UILabel *pageTitle;
      @property (nonatomic, strong) IBOutlet UILabel *subTitle;
   @end
  </code></pre>
  
  <p>The M File:</p>
  
  <pre><code> @implementation pageTitleView
  
     @synthesize pageTitle;
     @synthesize subTitle;
  
    - (id)initWithFrame:(CGRect)frame{
  
       pageTitle = [[UILabel alloc] initWithFrame:CGRectMake(0,labelPosY,300,20)];
       pageTitle.textColor = txtColour;
       pageTitle.backgroundColor = [UIColor clearColor];
       pageTitle.textAlignment = NSTextAlignmentCenter;
       pageTitle.font = [UIFont systemFontOfSize:14];
       // pageTitle.text to be set by parent view
      [self addSubview:pageTitle];
    }
  </code></pre>
  
  <p>With in my parent view controller I have the following:</p>
  
  <p>The Header File:</p>
  
  <pre><code>  #import &lt;UIKit/UIKit.h&gt;
  
     @interface UsingThisGuide : UIViewController
  
       @property (strong, nonatomic) UIView *PageTitleBlock;
       @property (strong, nonatomic) UIWebView *dispalyPageContent;
       @property (strong, nonatomic) UIView *FooterBar;
  
     @end
  </code></pre>
  
  <p>In the M file i have the following:</p>
  
  <pre><code>  #import &lt;QuartzCore/QuartzCore.h&gt;
    #import "pageTitleView.h"
    #import "MyFirstView.h"
  
    @interface MyFirstView ()
  
    @end
  
    @implementation MyFirstView {
     - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
         self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
           if (self) {
            // Custom initialization
            }
          return self;
       }
     - (void)viewDidLoad {
  
        _PageTitleBlock = [[pageTitleView alloc] initWithFrame:CGRectMake(0, 0, 300, 50)];
        _PageTitleBlock.layer.cornerRadius = 5;
  
        _PageTitleBlock.pageTitle.text = @"This should work but not";
  
        [self.view addSubview:_PageTitleBlock];
        [super viewDidLoad];
      }
  
   @end
  </code></pre>
  
  <p>No what i want to do is set the <code>pageTitle.text</code> from the <code>pageTitleView</code> class via its parent controller <code>MyFirstView</code> using something like <code>_PageTitleBlock.pageTitle.text=</code> but this is the error i am getting:</p>
  
  <pre><code>  Property 'pageTitle' not found on object of type 'UIView *
  </code></pre>