Uygulamam Sayfaların birçoğu Peyzaj, sadece birkaç sayfa Portre. Image benim sorunumu gösterir. Portre durumunda, klavyenin/tarih seçicinin üstündeki araç çubuğunun konumu doğru değil. Cihaz yönelimlerini ayarladım, Dikey/Yatay Sol/Yatay Yatay.iOS araç çubuğu klavye konumunun üstünde değil
UIToolbar *toolbar=[[UIToolbar alloc]init];
toolbar.barTintColor=[UIColor lightTextColor];
toolbar.frame=CGRectMake(0, 0, 320, 44);
UIBarButtonItem *item2=[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
UIBarButtonItem *item3=[[UIBarButtonItem alloc]initWithTitle:@"OK" style:UIBarButtonItemStylePlain target:self action:@selector(click)];
toolbar.items = @[item2,item3];
self.babyBirthdayTextfield.inputAccessoryView=toolbar;
konu da ben Sorunu çözdükten my app Portrait view's structure
web görünümü üzerinde oluştu: Ve Dikey sayfa benim kod içinde
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
if ([NSObject isiPhone]) {
return UIInterfaceOrientationPortrait;
}
return UIInterfaceOrientationLandscapeLeft | UIInterfaceOrientationLandscapeRight;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
if ([NSObject isiPhone]) {
return UIInterfaceOrientationMaskPortrait;
}
return UIInterfaceOrientationMaskLandscape;
}
- (BOOL)shouldAutorotate{
return YES;
}
takip benim araç çubuğu kodu vardır. Bu hikaye tahtasının kök denetleyicisi kalıcı bir penceredir. Dolabın türünü değiştirmek.
Lütfen klavyenize – atulkhatri