I'm using a library, which is a class that inherits from UIView. How do I programmatically create an UIViewController that uses this class, and not a normal UIView?
The ViewController's .h file looks as follows:
#import <UIKit/UIKit.h>
#import "PLView.h"
@interface HelloPanoramaViewController : UIViewController {
IBOutlet PLView * plView;
}
@property (nonatomic, retain) IBOutlet PLView *plView;
@end
The .m file as follows:
#import "HelloPanoramaViewController.h"
@implementation HelloPanoramaViewController
@synthesize plView;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do stuff here...
}
- (void)dealloc
{
[plView release];
[super dealloc];
}
@end
And then I should use a nib to let "plView variable pointing to the view". But without using Interface Builder, how would I do this programmatically? How could I let this UIViewController create an PLView, instead of an UIView?