@@ -86,6 +86,8 @@ - (void)setUpUI {
8686- (void )setUpEmptyFeedLabel {
8787 self.emptyFeedLabel = [[UILabel alloc ] init ];
8888 self.emptyFeedLabel .font = [ABKUIUtils preferredFontForTextStyle: UIFontTextStyleBody weight: UIFontWeightRegular];
89+ self.emptyFeedLabel .adjustsFontSizeToFitWidth = YES ;
90+ self.emptyFeedLabel .adjustsFontForContentSizeCategory = YES ;
8991 self.emptyFeedLabel .textAlignment = NSTextAlignmentCenter;
9092 self.emptyFeedLabel .numberOfLines = 0 ;
9193 self.emptyFeedLabel .translatesAutoresizingMaskIntoConstraints = NO ;
@@ -95,15 +97,16 @@ - (void)setUpEmptyFeedView {
9597 self.emptyFeedView = [[UIView alloc ] init ];
9698 self.emptyFeedView .backgroundColor = [UIColor clearColor ];
9799 [self .emptyFeedView addSubview: self .emptyFeedLabel];
100+ self.edgesForExtendedLayout = UIRectEdgeNone;
98101
99102 NSLayoutConstraint *centerXConstraint = [self .emptyFeedLabel.centerXAnchor constraintEqualToAnchor: self .emptyFeedView.centerXAnchor];
100103 NSLayoutConstraint *centerYConstraint = [self .emptyFeedLabel.centerYAnchor constraintEqualToAnchor: self .emptyFeedView.centerYAnchor];
101- NSLayoutConstraint *leftConstraint = [self .emptyFeedLabel.leftAnchor constraintEqualToAnchor: self .emptyFeedView.leftAnchor ];
102- NSLayoutConstraint *rightConstraint = [self .emptyFeedLabel.rightAnchor constraintEqualToAnchor: self .emptyFeedView.rightAnchor ];
103- NSLayoutConstraint *topConstraint = [self .emptyFeedLabel.topAnchor constraintEqualToAnchor: self .emptyFeedView.topAnchor];
104- NSLayoutConstraint *bottomConstraint = [self .emptyFeedLabel.bottomAnchor constraintEqualToAnchor: self .emptyFeedView.bottomAnchor];
104+ NSLayoutConstraint *leadingConstraint = [self .emptyFeedLabel.leadingAnchor constraintEqualToAnchor: self .emptyFeedView.layoutMarginsGuide.leadingAnchor ];
105+ NSLayoutConstraint *trailingConstraint = [self .emptyFeedLabel.trailingAnchor constraintEqualToAnchor: self .emptyFeedView.layoutMarginsGuide.trailingAnchor ];
106+ NSLayoutConstraint *topConstraint = [self .emptyFeedLabel.topAnchor constraintEqualToAnchor: self .emptyFeedView.layoutMarginsGuide. topAnchor];
107+ NSLayoutConstraint *bottomConstraint = [self .emptyFeedLabel.bottomAnchor constraintEqualToAnchor: self .emptyFeedView.layoutMarginsGuide. bottomAnchor];
105108 [NSLayoutConstraint activateConstraints: @[centerXConstraint, centerYConstraint,
106- leftConstraint, rightConstraint ,
109+ leadingConstraint, trailingConstraint ,
107110 topConstraint, bottomConstraint]];
108111}
109112
0 commit comments