Привет я пытаюсь отобразить объект класса uiview в окне, но дело в том, что он не отображается, не знаю, по какой причине не могу разобраться, пожалуйста, помогите мне, вот мой код
@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];
}
Спасибо