Skip to content

Commit

Permalink
fix styling issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Polshcha committed Oct 5, 2018
1 parent 248a7b0 commit 36ece8b
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 11 deletions.
Binary file modified Framework/PushwooshInboxBundle.bundle/Info.plist
Binary file not shown.
Binary file not shown.
Binary file modified Framework/PushwooshInboxBundle.bundle/PWIInboxViewController.nib
Binary file not shown.
Binary file modified Framework/PushwooshInboxBundle.bundle/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Framework/PushwooshInboxBundle.bundle/inbox_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Framework/PushwooshInboxBundle.bundle/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Framework/PushwooshInboxBundle.bundle/unread.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
2 changes: 1 addition & 1 deletion PushwooshInboxUI.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Pod::Spec.new do |s|

s.name = "PushwooshInboxUI"
s.version = "5.8.4"
s.version = "5.8.5"
s.summary = "Pushwoosh Inbox UI library by Pushwoosh."
s.platform = :ios
s.ios.deployment_target = '8.0'
Expand Down
8 changes: 4 additions & 4 deletions PushwooshInboxUI/PushwooshInboxUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 5.8.4;
CURRENT_PROJECT_VERSION = 5.8.5;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -673,7 +673,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 5.8.4;
CURRENT_PROJECT_VERSION = 5.8.5;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -702,7 +702,7 @@
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 5.8.4;
DYLIB_CURRENT_VERSION = 5.8.5;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = PushwooshInboxUI/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -722,7 +722,7 @@
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 5.8.4;
DYLIB_CURRENT_VERSION = 5.8.5;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = PushwooshInboxUI/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down
2 changes: 1 addition & 1 deletion PushwooshInboxUI/PushwooshInboxUI/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.8.4</string>
<string>5.8.5</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
35 changes: 31 additions & 4 deletions PushwooshInboxUI/PushwooshInboxUI/Public/PWIInboxStyle.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ - (void)setupTextColor:(UIColor *)color accentColor:(UIColor *)accentColor font:

_listEmptyMessage = NSLocalizedString(@"There are currently no messages in Inbox.",);
_listErrorMessage = NSLocalizedString(@"It seems something went wrong. Please try again later!",);

_unreadImage = [UIImage imageNamed:@"unread" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil];
_listErrorImage = [UIImage imageNamed:@"errorMessage" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil];
_listEmptyImage = [UIImage imageNamed:@"noMessage" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil];

[self updateAccentColor];
}

Expand All @@ -77,10 +82,25 @@ - (void)setAccentColor:(UIColor *)accentColor {
}
}

- (void)setUnreadImage:(UIImage *)unreadImage {
_unreadImage = unreadImage;
[self updateAccentColor];
}

- (void)setListErrorImage:(UIImage *)listErrorImage {
_listErrorImage = listErrorImage;
[self updateAccentColor];
}

- (void)setListEmptyImage:(UIImage *)listEmptyImage {
_listEmptyImage = listEmptyImage;
[self updateAccentColor];
}

- (void)updateAccentColor {
_unreadImage = [[UIImage imageNamed:@"unread" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil] pwi_imageWithTintColor:_accentColor];
_listErrorImage = [[UIImage imageNamed:@"errorMessage" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil] pwi_imageWithTintColor:_accentColor];
_listEmptyImage = [[UIImage imageNamed:@"noMessage" inBundle:[NSBundle pwi_bundleForClass:self.class] compatibleWithTraitCollection:nil] pwi_imageWithTintColor:_accentColor];
_unreadImage = [_unreadImage pwi_imageWithTintColor:_accentColor];
_listErrorImage = [_listErrorImage pwi_imageWithTintColor:_accentColor];
_listEmptyImage = [_listEmptyImage pwi_imageWithTintColor:_accentColor];
}

+ (void)setupDefaultStyle:(PWIInboxStyle *)style {
Expand All @@ -106,7 +126,14 @@ + (instancetype)createDefaultStyle {
}
[style setup];
[style setupTextColor:[UIColor darkTextColor] accentColor:accentColor font:[UIFont systemFontOfSize:17]];
style.titleFont = [UIFont systemFontOfSize:UIFont.systemFontSize weight:UIFontWeightMedium];

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
if ([UIFont respondsToSelector:@selector(systemFontOfSize:weight:)]) {
style.titleFont = [UIFont systemFontOfSize:UIFont.systemFontSize weight:UIFontWeightMedium];
}
#pragma clang diagnostic pop

return style;
}

Expand Down
2 changes: 1 addition & 1 deletion PushwooshInboxUI/PushwooshInboxUI/Public/PWIInboxUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import "PWIInboxStyle.h"
#import "PWIInboxViewController.h"

NSString * const PushwooshInboxUIVersion = @"5.8.4";
NSString * const PushwooshInboxUIVersion = @"5.8.5";

@implementation PWIInboxUI

Expand Down

0 comments on commit 36ece8b

Please sign in to comment.