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 { - (void)setAsMolecule {
self.translatesAutoresizingMaskIntoConstraints = NO; self.translatesAutoresizingMaskIntoConstraints = NO;
if (@available(iOS 11.0, *)) {
self.insetsLayoutMarginsFromSafeArea = NO;
}
} }
- (void)reset { - (void)reset {

View File

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

View File

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

View File

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

View File

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