iOS适配相关

2017-09-19  本文已影响28人  忆昔溪

问题一

@property (nonatomic) CGFloat estimatedRowHeight NS_AVAILABLE_IOS(7_0); // default is UITableViewAutomaticDimension, set to 0 to disable
self.tableView.estimatedRowHeight = 0;
self.tableView.estimatedSectionHeaderHeight = 0;
self.tableView.estimatedSectionFooterHeight = 0;

问题二

_lineImageView.left = frame.origin.x + frame.size.width / 2.0;
_lineImageView.left = yScreenWidth - (18.0 + frame.size.width / 2.0);

问题三

if (kSystemVersion >= 11.0 && [self.managerOwner isKindOfClass:[UIScrollView class]]) {
            UIScrollView *tempScrollView = (UIScrollView *)self.managerOwner;
            if (@available(iOS 11.0, *)) {
                tempScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
            }
        }

问题四

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '<UIView: 0x127dcd820; frame = (0 0; 320 568); layer = <CALayer: 0x1c0239600>> has been added as a subview to <UIVisualEffectView: 0x127dcbda0; frame = (0 0; 320 568); layer = <CALayer: 0x1c022fd00>>. Do not add subviews directly to the visual effect view itself, instead add them to the -contentView.'
@property (nonatomic, strong, readonly) UIView *contentView; // Do not add subviews directly to UIVisualEffectView, use this view instead.
//[self.bgView addSubview:self.contentView];
[self.bgView.contentView addSubview:self.contentView];

上面的bgView是UIVisualEffectView

上一篇 下一篇

猜你喜欢

热点阅读