Моя кнопка не отображается. Кто-нибудь знает почему?
#import "ViewController.h"
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
CTrial *tt = [CTrial alloc];
[tt hellothere:self];
}
/////////////////////////////
#import "CTrial.h"
@implementation CTrial
- (void) hellothere: (UIViewController*) ss
{
UIButton *btn2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btn2 setTag:200];
[btn2 addTarget:self action:@selector(menuSetup:) forControlEvents:UIControlEventTouchUpInside];
[btn2 setFrame:CGRectMake(0,0,300,200)];
[ss.view addSubview:btn2];
}
Я попробовал "id"
- (id) hellothere: (UIViewController*) ss
с возвратом, но все еще ничего
#import <UIKit/UIKit.h>
#import "CButton.h"
@interface CTrial : //UIView
-(void) menuSetup:(UIButton*) btn;
- (id) hellothere: (UIViewController*) ss;
//- (void) hellothere: (UIViewController*) ss;
@end