Issue while implementing MVC
<p>I am facing an issue while implementing MVC. I created a UIView subclass and have designed my custom view. I created a UIViewController subclass and pointed its view to my custom view class. Finally I created a NSObject subclass and created a model for my controller. When i am running the app, i am getting a black screen... Any idea on this?</p>

<p>==My Model==</p>

<pre><code>- (id) init
{
    imgArray = [[NSMutableArray alloc] initWithObjects: [UIImage imageNamed:@"scene.jpg"], 
        [UIImage imageNamed:@"scene1.jpg"], 
        [UIImage imageNamed:@"scene2.jpg"], nil];

    return self;
}
</code></pre>

<p>==My Controller==</p>

<pre><code>- (void)viewDidLoad {
    [super viewDidLoad];
    NSNotification
    CGRect mainFrame = [[UIScreen mainScreen] applicationFrame];

    // Get the view
    MVCView *myView = [[MVCView alloc] initWithFrame:mainFrame];

    // Get the data
    MVCModel *myModel = [[MVCModel alloc] init];
    myView.myImgView.image = [myModel.imgArray objectAtIndex:0];

    //[self.view addSubview:myView];
    [myView setNeedsDisplay];
    self.view = myView;
    self.title = @"MVC";
}
</code></pre>

<p>==My View==</p>

<pre><code>- (id)initWithFrame:(CGRect)frame {
     if ((self = [super initWithFrame:frame])) {
         // Initialization code
         CGRect imgFrame = CGRectMake(5, 20, 150, 150);
         //myImgView.image = [UIImage imageNamed:@"scene.jpg"];
         myImgView.frame = imgFrame;

         CGRect lblFrame = CGRectMake(5, 150, 50, 50);
         myLabel.text = @"Nature is beautiful";
         myLabel.frame = lblFrame;

         CGRect sldFrame = CGRectMake(5, 200, 50, 50);
         mySlider.minimumValue = 0;
         mySlider.maximumValue = 100;
         mySlider.frame = sldFrame;
     }
     return self;
}

// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code

    CGPoint imgPoint = CGPointMake(10, 20);
    [self.myImgView drawAtPoint:imgPoint];

    CGPoint lblPoint = CGPointMake(10, 160);
    [self.myLabel drawAtPoint:lblPoint];

    CGPoint sldPoint = CGPointMake(10, 210);
    [self.mySlider drawAtPoint:sldPoint];
}
</code></pre>
