Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit 546db71

Browse files
authored
Merge pull request #118 from wordpress-mobile/improve-no-results-view
Improve no results view
2 parents 7292168 + e979f72 commit 546db71

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

WordPress-iOS-Shared.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "WordPress-iOS-Shared"
3-
s.version = "0.8.0"
3+
s.version = "0.8.1"
44
s.summary = "Shared components used in building the WordPress iOS apps and other library components."
55

66
s.description = <<-DESC

WordPress-iOS-Shared/Core/WPNoResultsView.m

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ - (instancetype)init {
4848

4949
// Button
5050
_button = [UIButton buttonWithType:UIButtonTypeCustom];
51-
_button.titleLabel.font = [WPStyleGuide regularTextFont];
51+
_button.titleLabel.font = [WPStyleGuide subtitleFontBold];
5252
_button.hidden = YES;
5353
[_button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
54-
[_button setTitleColor:[WPStyleGuide allTAllShadeGrey] forState:UIControlStateNormal];
54+
[_button setTitleColor:[WPStyleGuide wordPressBlue] forState:UIControlStateNormal];
5555
[_button setBackgroundImage:[self newButtonBackgroundImage] forState:UIControlStateNormal];
5656

5757
// Insert Subviews
@@ -73,7 +73,7 @@ - (void)didMoveToSuperview {
7373

7474
- (void)layoutSubviews {
7575

76-
CGFloat width = 250.0f;
76+
CGFloat width = 280.0f;
7777

7878
[self hideAccessoryViewIfNecessary];
7979

@@ -131,8 +131,9 @@ - (UIImage *)newButtonBackgroundImage {
131131
UIGraphicsBeginImageContextWithOptions(fillRect.size, NO, [[UIScreen mainScreen] scale]);
132132
CGContextRef context = UIGraphicsGetCurrentContext();
133133

134-
CGContextSetStrokeColorWithColor(context, [WPStyleGuide allTAllShadeGrey].CGColor);
135-
CGContextAddPath(context, [UIBezierPath bezierPathWithRoundedRect:CGRectInset(fillRect, 1, 1) cornerRadius:2.0].CGPath);
134+
CGContextSetStrokeColorWithColor(context, [WPStyleGuide wordPressBlue].CGColor);
135+
CGContextAddPath(context, [UIBezierPath bezierPathWithRoundedRect:CGRectInset(fillRect, 1, 1)
136+
cornerRadius:2.0].CGPath);
136137
CGContextStrokePath(context);
137138

138139
UIImage *mainImage = UIGraphicsGetImageFromCurrentImageContext();
@@ -219,8 +220,12 @@ - (void)centerInSuperview {
219220

220221
if ([self.superview isKindOfClass:[UITableView class]]) {
221222
UITableView *tableView = (UITableView *)self.superview;
222-
CGFloat headerHeight = (tableView.tableHeaderView == nil || tableView.tableHeaderView.hidden) ? 0 : tableView.tableHeaderView.bounds.size.height;
223-
CGFloat footerHeight = (tableView.tableFooterView == nil || tableView.tableFooterView.hidden) ? 0 : tableView.tableFooterView.bounds.size.height;
223+
CGFloat headerHeight = (tableView.tableHeaderView == nil
224+
|| tableView.tableHeaderView.hidden
225+
|| tableView.tableHeaderView.alpha == 0.0) ? 0 : tableView.tableHeaderView.bounds.size.height;
226+
CGFloat footerHeight = (tableView.tableFooterView == nil
227+
|| tableView.tableFooterView.hidden
228+
|| tableView.tableFooterView.alpha == 0.0) ? 0 : tableView.tableFooterView.bounds.size.height;
224229

225230
verticalOffset += (headerHeight + footerHeight);
226231

0 commit comments

Comments
 (0)