Ceci est mon code, été pendant un certain temps, mais ne peut toujours pas le faire fonctionner.UIButton n'apparaît pas dans UIScrollView
suggestionScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 44, 320, 44)];
UIButton *button = [[UIButton alloc] init];
button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button addTarget:self
action:@selector(aMethod:)
forControlEvents:UIControlEventTouchDown];
[button setTitle:@"Show View" forState:UIControlStateNormal];
button.frame = CGRectMake(0, 44.0, 160.0, 40.0);
[suggestionScrollView addSubview:button];
[suggestionScrollView bringSubviewToFront:button];
[self.view addSubview:suggestionScrollView];
[self.view bringSubviewToFront:suggestionScrollView];
[button release];
Vous devez toujours baliser les questions avec une plate-forme et/ou une langue. –
Désolé, nous le ferons la prochaine fois. –