settingsView layout , separatorLine, etc
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
- (void)commonInit {
|
||||
// 默认值
|
||||
_leadingTrailingPadding = 0;
|
||||
_separatorLinePadding = 9;
|
||||
_separatorLinePadding = 18;
|
||||
_sectionTitle = @"Section";
|
||||
_expanded = YES;
|
||||
_backgroundColor = [UIColor clearColor];
|
||||
@@ -173,11 +173,14 @@
|
||||
]];
|
||||
|
||||
// 分隔线约束
|
||||
self.clipsToBounds = false;//mark: settingMenuLayout
|
||||
[NSLayoutConstraint activateConstraints:@[
|
||||
[_separatorLine.leadingAnchor constraintEqualToAnchor:self.leadingAnchor],
|
||||
[_separatorLine.trailingAnchor constraintEqualToAnchor:self.trailingAnchor],
|
||||
//[_separatorLine.leadingAnchor constraintEqualToAnchor:self.leadingAnchor],
|
||||
//[_separatorLine.trailingAnchor constraintEqualToAnchor:self.trailingAnchor],
|
||||
[_separatorLine.centerXAnchor constraintEqualToAnchor:self.centerXAnchor],
|
||||
[_separatorLine.widthAnchor constraintEqualToConstant:1000], // //mark: settingMenuLayout
|
||||
[_separatorLine.bottomAnchor constraintEqualToAnchor:self.bottomAnchor],
|
||||
[_separatorLine.heightAnchor constraintEqualToConstant:1.0]
|
||||
[_separatorLine.heightAnchor constraintEqualToConstant:2]
|
||||
]];
|
||||
|
||||
[NSLayoutConstraint activateConstraints:@[
|
||||
@@ -298,7 +301,7 @@
|
||||
[self setupConstraints];
|
||||
if (_expanded) {
|
||||
_rootStackView.hidden = NO;
|
||||
_separatorLine.hidden = YES;
|
||||
_separatorLine.hidden = NO;
|
||||
CGSize fittingSize = [self.rootStackView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize];
|
||||
CGFloat rootStackViewHeight = fittingSize.height;
|
||||
fittingSize = [self.headerView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize];
|
||||
|
||||
@@ -687,8 +687,8 @@ const int FrontViewPositionNone = 0xff;
|
||||
_frontViewPosition = FrontViewPositionLeft;
|
||||
_rearViewPosition = FrontViewPositionLeft;
|
||||
_rightViewPosition = FrontViewPositionLeft;
|
||||
_rearViewRevealWidth = 492.0f;
|
||||
_rearViewRevealWidth = 400;
|
||||
// _rearViewRevealWidth = 492.0f;
|
||||
_rearViewRevealWidth = 350; //mark: settingMenuLayout
|
||||
// _rearViewRevealOverdraw = 60.0f;
|
||||
_rearViewRevealOverdraw = 0.0f;
|
||||
_rearViewRevealDisplacement = 40.0f;
|
||||
@@ -899,8 +899,8 @@ const int FrontViewPositionNone = 0xff;
|
||||
|
||||
[_separatorLine.bottomAnchor constraintEqualToAnchor:_contentView.bottomAnchor constant:0],
|
||||
//[_separatorLine.leadingAnchor constraintEqualToAnchor:self.leadingAnchor constant:self.bounds.size.width-60],
|
||||
[_separatorLine.leadingAnchor constraintEqualToAnchor:_contentView.frontView.leadingAnchor constant:5],
|
||||
[_separatorLine.trailingAnchor constraintEqualToAnchor:_contentView.frontView.leadingAnchor constant:6.5],
|
||||
[_separatorLine.leadingAnchor constraintEqualToAnchor:_contentView.frontView.leadingAnchor constant:0],
|
||||
[_separatorLine.trailingAnchor constraintEqualToAnchor:_contentView.frontView.leadingAnchor constant:2], //mark: settingMenuLayout
|
||||
]];
|
||||
}
|
||||
|
||||
|
||||
@@ -389,9 +389,8 @@ BOOL isCustomResolution(CGSize res) {
|
||||
[NSLayoutConstraint activateConstraints:@[
|
||||
[parentStack.topAnchor constraintEqualToAnchor:self.scrollView.contentLayoutGuide.topAnchor constant: [self getStandardNavBarHeight] + 13],
|
||||
[parentStack.bottomAnchor constraintEqualToAnchor:self.scrollView.contentLayoutGuide.bottomAnchor constant:-20],
|
||||
[parentStack.leadingAnchor constraintEqualToAnchor:self.scrollView.contentLayoutGuide.leadingAnchor constant: 14],
|
||||
[parentStack.trailingAnchor constraintEqualToAnchor:self.scrollView.contentLayoutGuide.trailingAnchor constant: -15],
|
||||
[parentStack.widthAnchor constraintEqualToAnchor:self.scrollView.contentLayoutGuide.widthAnchor]
|
||||
[parentStack.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant: 0], //mark: settingMenuLayout
|
||||
[parentStack.widthAnchor constraintEqualToAnchor:self.view.widthAnchor constant:-20] // section width adjusted here //mark: settingMenuLayout
|
||||
]];
|
||||
}
|
||||
|
||||
@@ -403,7 +402,6 @@ BOOL isCustomResolution(CGSize res) {
|
||||
}
|
||||
|
||||
- (void)layoutSections{
|
||||
NSLog(@"preLoad Log test");
|
||||
MenuSectionView *videoSection = [[MenuSectionView alloc] init];
|
||||
videoSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Video"];
|
||||
if (@available(iOS 13.0, *)) {
|
||||
|
||||
Reference in New Issue
Block a user