objc
stv.layoutMarginsRelativeArrangement = YES;
if (@available(iOS 11.0, *)) {
stv.directionalLayoutMargins = NSDirectionalEdgeInsetsMake(0, 0, 0, 16);
} else {
stv.layoutMargins = UIEdgeInsetsMake(0, 0, 0, 16);
}
swift
stv.isLayoutMarginsRelativeArrangement = true
if #available(iOS 11.0, *) {
stv.directionalLayoutMargins = NSDirectionalEdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 16)
} else {
stv.layoutMargins = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 16)
}