Is there a way to create a control during runtime? I tried something like
UIButton* tempButton = [[UIButton alloc] initWithFrame:CGRectMake(120, 1开发者_开发技巧60, 40, 40)];
[self.view insertSubview:tempButton atIndex:0];
[tempButton release];
it does not work
UIButton* tempButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] initWithFrame:CGRectMake(120, 160, 40, 40)];
[self.view insertSubview:tempButton atIndex:0];
[tempButton release];
精彩评论