Actuellement, j'ai cette fonctionnalité dans mon application où je mis en place un UIScrollView qui est assez mince en hauteur, mais longue largeur ...UIScrollView contenu MainView chevauchement
Comme vous pouvez le voir, le UIScrollView CHEVAUCHEMENT de la vue de fond ... Ce fond blanc n'est pas un UIView auquel j'ai ajouté le UIScrollView en tant que SUBVIEW.
La question est, comment UIScrollView recouvre-t-il le contenu d'arrière-plan noir lorsqu'il vient d'être ajouté à la sous-vue?
Voici ma méthode init pour le UIScrollView ..
self = [super init];
if (self) {
self.frame = CGRectMake(0, 0, 280, 70);
self.contentSize = CGSizeMake(480, 70);
self.showsHorizontalScrollIndicator = NO;
self.bounces = NO;
}
Et voici comment j'ai ajouté le UIScrollView au UIView (vue whitebackground) dont le nom est ForecastView:
_hourlyForecast = [[hourlyForecastScrollView alloc] init:_city state:_state icons:_icons times:_times temps:_temps];
_hourlyForecast.backgroundColor = [UIColor blueColor];
_hourlyForecast.frame = CGRectMake(20, 20, self.ForecastView.bounds.size.width, 70);
[_ForecastView addSubview:_hourlyForecast];
AHH votre génie !!! Merci @Turch !!! – jsetting32