UIButton die addtarget: nicht genannt nach berühren!

Ich habe den folgenden code, und wenn ich drücken Sie die UIButton, nichts genannt wird, und es nicht abstürzt.

    calloutButton = [[UIView alloc] initWithFrame:CGRectMake(left_width2*2-3, 5, 230, 230)];
    UIButton *buttongo= [UIButton buttonWithType:UIButtonTypeDetailDisclosure];

    buttongo.frame=CGRectMake(0, -1, 25, 25);
    [buttongo addTarget:self action:@selector(buttonEvent:) forControlEvents:UIControlEventTouchUpInside];
    [calloutButton addSubview:buttongo];

    [label addSubview:calloutButton];




    -(IBAction)buttonEvent:(id)sender 
    {
          NSLog(@"Hello...");
    }

Jemand Weiß, warum?

Dank!

InformationsquelleAutor saimonx | 2011-02-05
Schreibe einen Kommentar