Kullanıcı os işletim sistemi 9.0'a güncellendiğinden beri bir hatayla karşılaşan eski bir projem var. Şey benim görüşüme yüklendi, tüm düğme ve işlev iyi çalışıyor ama kullanıcı arayüzü sadece boş.ios 9'da xib dosyasından alt görünüm nasıl eklenir?
benim viewcontroller: Burada
benim app ekran görüntüsü benim app ios burada 9,1ve çalışıyorsa benim kodudur .h dosyası:
@property (strong, nonatomic) IBOutlet UIScrollView *theScrollView;
@property (weak, nonatomic) IBOutlet UIView *mainToolbar2;
benim viewcontroller.m: Ben bilmiyordum xib dosyasından subview eklemek için ios 9 bazı değişiklik olduğunu düşünüyorum
CGRect scrollViewRect = CGRectInset(viewRect, -scrollViewOutset, 0.0f);
self.theScrollView = [[UIScrollView alloc] initWithFrame:scrollViewRect]; // All
self.theScrollView.autoresizesSubviews = NO;
self.theScrollView.contentMode = UIViewContentModeRedraw;
self.theScrollView.showsHorizontalScrollIndicator = NO;
self.theScrollView.showsVerticalScrollIndicator = NO;
self.theScrollView.scrollsToTop = NO;
self.theScrollView.delaysContentTouches = NO;
self.theScrollView.pagingEnabled = YES;
self.theScrollView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
self.theScrollView.backgroundColor = [UIColor redColor];
self.theScrollView.delegate = self;
if (_isArabic) {
self.theScrollView.transform=CGAffineTransformMakeRotation(M_PI * (180)/180.0);
}
[self.mainView addSubview:self.theScrollView];
CGRect toolbarRect = viewRect;
toolbarRect.size.height = TOOLBAR_HEIGHT;
self.mainToolbar = [[ReaderMainToolbar alloc] initWithFrame:toolbarRect document:document]; // ReaderMainToolbar
self.mainToolbar.delegate = self; // ReaderMainToolbarDelegate
[self.mainView addSubview:self.mainToolbar];
if (fakeStatusBar != nil) [self.mainView addSubview:fakeStatusBar]; // Add status bar background view
for (UIView *subView in self.mainToolbar.subviews)
{
[subView removeFromSuperview];
}
[self.mainToolbar addSubview:self.mainToolbar2];
. Uygulamanın ios 9'da çalışabilmesi için bu sorunu nasıl giderebilirim?