मैं करने के लिए जो मैं सफलतापूर्वक अतीत में एक ढाल पृष्ठभूमि लागू नए जोड़े subview भेजने वापस करने के लिए द्वारा एक UITableViewController है: हालांकि, यह अब काम करता हैsendSubviewToBack UITableView पर iOS में ठीक से काम नहीं 11
//performed on viewDidLoad
UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1.5*280, 1.5*SCREEN_HEIGHT)];
bgView.backgroundColor = [UIColor yellowColor];
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = bgView.bounds;
gradient.startPoint = CGPointMake(0, 0);
gradient.endPoint = CGPointMake(1, 1);
UIColor *topColor = UIColorFromRGB(0x229f80);
UIColor *bottomColor = UIColorFromRGB(0x621ad9);
gradient.colors = [NSArray arrayWithObjects:(id)[topColor CGColor], (id)[bottomColor CGColor], nil];
[bgView.layer insertSublayer:gradient atIndex:0];
[self.view addSubview:bgView];
[self.view sendSubviewToBack:bgView];
bgView = nil;
आईओएस 11 में और bgView वास्तव में सभी कोशिकाओं के शीर्ष पर रखा गया है।
किसी को भी जानता है कि मैं इसे ठीक कर सकते हैं? या शायद मैं इसे हर समय गलत कर रहा था?
[self.view sendSubviewToBack: bgView]; इसके बजाए, इस विधि को आजमाएं - (शून्य) एक्सचेंजस्यूव्यूएट इंडेक्स: (एनएसआईएनटेगर) इंडेक्स 1 के साथ सबव्यूएट इंडेक्स: (एनएसआईएनटेगर) इंडेक्स 2 – Ellen