hi am trying to display a uiview class object in the window but the thing is that its not being displayed don't know for what reason am not able to sort out please do help me out, here's my code
@interface Myview : UIViewController {
UIView *move_view;
UIButton *btn;
}
@end
#import "Myview.h"
@implementation Myview
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)init {
if (self = [super init]) {
// Custom initialization
[move_view setFrame:CGRectMake(41, 91, 64, 82)];
[move_view setBackgroundColor:[UIColor redColor]];
btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btn setFrame:CGRectMake(113, 298, 72, 37)];
[btn setTitle:@"Move" forState:UIControlStateNormal];
[btn addTarget:self action:@selector(moveaview) forControlEvents:UIControlEventTouchUpInside];
}
return self;
}
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
[super loadView];
[self.view addSubview:move_view];
[self.view addSubview:btn];
}
Thank you