Skip to content

Commit 36ece8b

Browse files
author
Sergey Polshcha
committed
fix styling issue
1 parent 248a7b0 commit 36ece8b

File tree

13 files changed

+38
-11
lines changed

13 files changed

+38
-11
lines changed
2 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
-778 Bytes
Loading
Loading
595 Bytes
Loading
Binary file not shown.

PushwooshInboxUI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Pod::Spec.new do |s|
66

77
s.name = "PushwooshInboxUI"
8-
s.version = "5.8.4"
8+
s.version = "5.8.5"
99
s.summary = "Pushwoosh Inbox UI library by Pushwoosh."
1010
s.platform = :ios
1111
s.ios.deployment_target = '8.0'

PushwooshInboxUI/PushwooshInboxUI.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@
613613
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
614614
CODE_SIGN_IDENTITY = "iPhone Developer";
615615
COPY_PHASE_STRIP = NO;
616-
CURRENT_PROJECT_VERSION = 5.8.4;
616+
CURRENT_PROJECT_VERSION = 5.8.5;
617617
DEBUG_INFORMATION_FORMAT = dwarf;
618618
ENABLE_STRICT_OBJC_MSGSEND = YES;
619619
ENABLE_TESTABILITY = YES;
@@ -673,7 +673,7 @@
673673
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
674674
CODE_SIGN_IDENTITY = "iPhone Developer";
675675
COPY_PHASE_STRIP = NO;
676-
CURRENT_PROJECT_VERSION = 5.8.4;
676+
CURRENT_PROJECT_VERSION = 5.8.5;
677677
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
678678
ENABLE_NS_ASSERTIONS = NO;
679679
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -702,7 +702,7 @@
702702
CODE_SIGN_STYLE = Automatic;
703703
DEFINES_MODULE = YES;
704704
DYLIB_COMPATIBILITY_VERSION = 1;
705-
DYLIB_CURRENT_VERSION = 5.8.4;
705+
DYLIB_CURRENT_VERSION = 5.8.5;
706706
DYLIB_INSTALL_NAME_BASE = "@rpath";
707707
INFOPLIST_FILE = PushwooshInboxUI/Info.plist;
708708
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -722,7 +722,7 @@
722722
CODE_SIGN_STYLE = Automatic;
723723
DEFINES_MODULE = YES;
724724
DYLIB_COMPATIBILITY_VERSION = 1;
725-
DYLIB_CURRENT_VERSION = 5.8.4;
725+
DYLIB_CURRENT_VERSION = 5.8.5;
726726
DYLIB_INSTALL_NAME_BASE = "@rpath";
727727
INFOPLIST_FILE = PushwooshInboxUI/Info.plist;
728728
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";

PushwooshInboxUI/PushwooshInboxUI/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>5.8.4</string>
18+
<string>5.8.5</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

PushwooshInboxUI/PushwooshInboxUI/Public/PWIInboxStyle.m

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ - (void)setupTextColor:(UIColor *)color accentColor:(UIColor *)accentColor font:
6767

6868
_listEmptyMessage = NSLocalizedString(@"There are currently no messages in Inbox.",);
6969
_listErrorMessage = NSLocalizedString(@"It seems something went wrong. Please try again later!",);
70+
71+
_unreadImage = [UIImage imageNamed:@"unread" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil];
72+
_listErrorImage = [UIImage imageNamed:@"errorMessage" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil];
73+
_listEmptyImage = [UIImage imageNamed:@"noMessage" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil];
74+
7075
[self updateAccentColor];
7176
}
7277

@@ -77,10 +82,25 @@ - (void)setAccentColor:(UIColor *)accentColor {
7782
}
7883
}
7984

85+
- (void)setUnreadImage:(UIImage *)unreadImage {
86+
_unreadImage = unreadImage;
87+
[self updateAccentColor];
88+
}
89+
90+
- (void)setListErrorImage:(UIImage *)listErrorImage {
91+
_listErrorImage = listErrorImage;
92+
[self updateAccentColor];
93+
}
94+
95+
- (void)setListEmptyImage:(UIImage *)listEmptyImage {
96+
_listEmptyImage = listEmptyImage;
97+
[self updateAccentColor];
98+
}
99+
80100
- (void)updateAccentColor {
81-
_unreadImage = [[UIImage imageNamed:@"unread" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil] pwi_imageWithTintColor:_accentColor];
82-
_listErrorImage = [[UIImage imageNamed:@"errorMessage" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil] pwi_imageWithTintColor:_accentColor];
83-
_listEmptyImage = [[UIImage imageNamed:@"noMessage" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil] pwi_imageWithTintColor:_accentColor];
101+
_unreadImage = [_unreadImage pwi_imageWithTintColor:_accentColor];
102+
_listErrorImage = [_listErrorImage pwi_imageWithTintColor:_accentColor];
103+
_listEmptyImage = [_listEmptyImage pwi_imageWithTintColor:_accentColor];
84104
}
85105

86106
+ (void)setupDefaultStyle:(PWIInboxStyle *)style {
@@ -106,7 +126,14 @@ + (instancetype)createDefaultStyle {
106126
}
107127
[style setup];
108128
[style setupTextColor:[UIColor darkTextColor] accentColor:accentColor font:[UIFont systemFontOfSize:17]];
109-
style.titleFont = [UIFont systemFontOfSize:UIFont.systemFontSize weight:UIFontWeightMedium];
129+
130+
#pragma clang diagnostic push
131+
#pragma clang diagnostic ignored "-Wpartial-availability"
132+
if ([UIFont respondsToSelector:@selector(systemFontOfSize:weight:)]) {
133+
style.titleFont = [UIFont systemFontOfSize:UIFont.systemFontSize weight:UIFontWeightMedium];
134+
}
135+
#pragma clang diagnostic pop
136+
110137
return style;
111138
}
112139

PushwooshInboxUI/PushwooshInboxUI/Public/PWIInboxUI.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#import "PWIInboxStyle.h"
1111
#import "PWIInboxViewController.h"
1212

13-
NSString * const PushwooshInboxUIVersion = @"5.8.4";
13+
NSString * const PushwooshInboxUIVersion = @"5.8.5";
1414

1515
@implementation PWIInboxUI
1616

0 commit comments

Comments
 (0)