fix inset defect for safe area

This commit is contained in:
Pfeil, Scott Robert 2019-08-13 15:38:06 -04:00
parent 18c916eba0
commit ab08845708
5 changed files with 16 additions and 1 deletions

View File

@ -48,6 +48,9 @@
- (void)setAsMolecule {
self.translatesAutoresizingMaskIntoConstraints = NO;
if (@available(iOS 11.0, *)) {
self.insetsLayoutMarginsFromSafeArea = NO;
}
}
- (void)reset {

View File

@ -61,6 +61,9 @@
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
tableView.delegate = self;
tableView.dataSource = self;
if (@available(iOS 11.0, *)) {
tableView.insetsContentViewsToSafeArea = NO;
}
if ([tableView respondsToSelector:@selector(setCellLayoutMarginsFollowReadableWidth:)]) {
tableView.cellLayoutMarginsFollowReadableWidth = NO;
}

View File

@ -25,7 +25,6 @@ open class ThreeLayerTableViewController: MFProgrammaticTableViewController {
open override func updateViews() {
super.updateViews()
let width = view.bounds.width
MFStyler.setDefaultMarginsFor(contentView, size: width)
if let topView = topView as? MVMCoreViewProtocol {
topView.updateView(width)
showHeader(width)

View File

@ -37,6 +37,11 @@ open class MoleculeCollectionViewCell: UICollectionViewCell, MVMCoreUIMoleculeVi
}
isAccessibilityElement = false
contentView.isAccessibilityElement = false
if #available(iOS 11.0, *) {
insetsLayoutMarginsFromSafeArea = false
contentView.insetsLayoutMarginsFromSafeArea = false
contentView.preservesSuperviewLayoutMargins = false
}
// Covers the card when peaking.
peakingCover.backgroundColor = .white

View File

@ -80,6 +80,11 @@ import UIKit
public func setupView() {
selectionStyle = .none
if #available(iOS 11.0, *) {
insetsLayoutMarginsFromSafeArea = false
contentView.insetsLayoutMarginsFromSafeArea = false
contentView.preservesSuperviewLayoutMargins = false
}
}
// MARK: - MVMCoreUIMoleculeViewProtocol