I am trying to use a default AlertViewController with style .actionSheet. For some reason, the alert causes a constraint error. As long as
The solution for Objective-C:
Define prune-function like in previous reply
@implementation TemplateAlertController
-(void) viewDidLoad {
[super viewDidLoad];
[self mPruneNegativeWithConstraints];
}
-(void) mPruneNegativeWithConstraints {
for (UIView* iSubview in [self.view subviews]) {
for (NSLayoutConstraint* iConstraint in [iSubview constraints]) {
if ([iConstraint.debugDescription containsString:@"width == - 16"]) {
[iSubview removeConstraint:iConstraint];
}
}
}
}
@end