2017-09-03 1 views
3

En essayant de porter mon projet de iOS 10 à 11, tout le clavier de l'application est vide (voir photo). Essayer de basculer entre les claviers rendements du conflit contrainte suivante:iOS 11 Clavier vide et conflit de disposition interne dans UIInputSwitcherTableCellSegmentView

[LayoutConstraints] Unable to simultaneously satisfy constraints. 
Probably at least one of the constraints in the following list is one you don't want. 
Try this: 
    (1) look at each constraint and try to figure out which you don't expect; 
    (2) find the code that added the unwanted constraint or constraints and fix it. 
(
"<NSLayoutConstraint:0x60c00048a460 'UISV-canvas-connection' UIStackView:0x7fee26e56210.leading == UIInputSwitcherTableCellSegmentView:0x7fee26e512a0.leading (active)>", 
"<NSLayoutConstraint:0x60c0004853c0 'UISV-canvas-connection' H:[UIInputSwitcherTableCellSegmentView:0x7fee26e57ed0]-(0)-| (active, names: '|':UIStackView:0x7fee26e56210)>", 
"<NSLayoutConstraint:0x60c000486fe0 'UISV-fill-equally' UIInputSwitcherTableCellSegmentView:0x7fee26e56850.width == UIInputSwitcherTableCellSegmentView:0x7fee26e512a0.width (active)>", 
"<NSLayoutConstraint:0x60c000487170 'UISV-fill-equally' UIInputSwitcherTableCellSegmentView:0x7fee26e57ed0.width == UIInputSwitcherTableCellSegmentView:0x7fee26e512a0.width (active)>", 
"<NSLayoutConstraint:0x60c000486bd0 'UISV-spacing' H:[UIInputSwitcherTableCellSegmentView:0x7fee26e512a0]-(9)-[UIInputSwitcherTableCellSegmentView:0x7fee26e56850] (active)>", 
"<NSLayoutConstraint:0x60c000486f40 'UISV-spacing' H:[UIInputSwitcherTableCellSegmentView:0x7fee26e56850]-(9)-[UIInputSwitcherTableCellSegmentView:0x7fee26e57ed0] (active)>", 
"<NSLayoutConstraint:0x60c000481450 'UIView-Encapsulated-Layout-Width' UIStackView:0x7fee26e56210.width == 0 (active)>" 
) 

Will attempt to recover by breaking constraint 

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. 
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 
2017-09-03 12:05:00.235487+0300 ProjectName[87479:26834044] -[UIWindow endDisablingInterfaceAutorotationAnimated:] called on <UIRemoteKeyboardWindow: 0x7fee298a1000; frame = (0 0; 375 667); opaque = NO; autoresize = W+H; layer = <UIWindowLayer: 0x604000234d00>> without matching -beginDisablingInterfaceAutorotation. Ignoring. 

Switching Keyboards

English Keyboard

Répondre

1

Ceci est causé par un iOS interne 11 problème lorsque l'extension suivante est mise en œuvre . Retirez l'extension et le clavier est de retour.

UIView + TintColor.h

#ifndef UIView_TintColor_h 
#define UIView_TintColor_h 

#import <UIKit/UIKit.h> 
@interface UIView (TintColor) 
@property (nonatomic,retain) UIColor* tintColor; 
@end 
#endif /* UIView_TintColor_h */ 

UIView + TintColor.m

#import <Foundation/Foundation.h> 
#import "UIView+TintColor.h" 
#import <objc/runtime.h> 

static char const * const tintColorKey = "tintColorKey"; 

@implementation UIView (TintColor) 

-(UIColor*)tintColor 
{ 
    return objc_getAssociatedObject(self , tintColorKey); 
} 

-(void)setTintColor:(UIColor *)tintColor 
{ 
    objc_setAssociatedObject(self, tintColorKey, tintColor, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 
} 

@end 
+0

Où voulez-vous dire que je devrais retirer UIView + TintColor.h/m? –