This line of code to be converted to safe area for iPhone X
self.view.translatesAutoresizingMaskIntoConstraints = NO;
id views = @{
@"carbonTabSwipe" : self.view,
@"topLayoutGuide" : rootViewController.topLayoutGuide,
@"bottomLayoutGuide" : rootViewController.bottomLayoutGuide
};
NSString *verticalFormat = @"V:[topLayoutGuide][carbonTabSwipe][bottomLayoutGuide]";
[rootViewController.view
addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:verticalFormat
options:0
metrics:nil
views:views]];
[rootViewController.view
addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[carbonTabSwipe]|"
options:0
metrics:nil
views:views]];
This works for other devices but iPhone X it shows space at the bottom.