Skip to content

Commit 27115dc

Browse files
author
Diego Serrano
committed
Update 'powered by' text
1 parent ca6d830 commit 27115dc

File tree

6 files changed

+28
-10
lines changed

6 files changed

+28
-10
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.24.1 (2023-02-16)
2+
3+
### Changes:
4+
5+
- Update "powered by InMoment" text
6+
17
## 0.24.0 (2023-01-31)
28

39
### Changes:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The easiest way to get Wootric into your iOS project is to use [CocoaPods](http:
2828

2929
2. Create a file in your Xcode project called Podfile and add the following line:
3030
```ruby
31-
pod "WootricSDK", "~> 0.24.0"
31+
pod "WootricSDK", "~> 0.24.1"
3232
```
3333

3434
3. In your Xcode project directory run the following command:

WootricSDK.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 = 'WootricSDK'
3-
s.version = '0.24.0'
3+
s.version = '0.24.1'
44
s.license = 'MIT'
55
s.summary = 'Wootric SDK for displaying survey for end user.'
66
s.homepage = 'https://github.com/Wootric/WootricSDK-iOS'

WootricSDK/WootricSDK.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@
972972
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
973973
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
974974
MACH_O_TYPE = mh_dylib;
975-
MARKETING_VERSION = 0.24.0;
975+
MARKETING_VERSION = 0.24.1;
976976
MODULEMAP_FILE = "";
977977
PRODUCT_BUNDLE_IDENTIFIER = "com.wootric.$(PRODUCT_NAME:rfc1034identifier)";
978978
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -999,7 +999,7 @@
999999
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
10001000
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
10011001
MACH_O_TYPE = mh_dylib;
1002-
MARKETING_VERSION = 0.24.0;
1002+
MARKETING_VERSION = 0.24.1;
10031003
MODULEMAP_FILE = "";
10041004
PRODUCT_BUNDLE_IDENTIFIER = "com.wootric.$(PRODUCT_NAME:rfc1034identifier)";
10051005
PRODUCT_NAME = "$(TARGET_NAME)";

WootricSDK/WootricSDK/WTRSurveyViewController+Views.m

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,15 @@ - (void)setupPoweredByWootric {
9999
self.poweredByWootric = [[UIButton alloc] init];
100100
[self.poweredByWootric setTranslatesAutoresizingMaskIntoConstraints:NO];
101101
NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@%@", kPoweredBy, kInMoment]];
102-
[attrStr addAttribute:NSForegroundColorAttributeName value:[WTRColor poweredByColor] range:NSMakeRange(0, kPoweredBy.length - 1)];
103-
[attrStr addAttribute:NSForegroundColorAttributeName value:[WTRColor wootricTextColor] range:NSMakeRange(kPoweredBy.length, kInMoment.length)];
104-
[attrStr addAttribute:NSFontAttributeName value:[UIItems regularFontWithSize:10] range:NSMakeRange(0, kPoweredBy.length + kInMoment.length)];
102+
if ([WTRColor poweredByColor] != nil && [WTRColor wootricTextColor] != nil && [UIItems regularFontWithSize:10] != nil && kPoweredBy.length > 1 && kInMoment.length > 1) {
103+
[attrStr addAttribute:NSForegroundColorAttributeName value:[WTRColor poweredByColor] range:NSMakeRange(0, kPoweredBy.length - 1)];
104+
[attrStr addAttribute:NSForegroundColorAttributeName value:[WTRColor wootricTextColor] range:NSMakeRange(kPoweredBy.length, kInMoment.length)];
105+
[attrStr addAttribute:NSFontAttributeName value:[UIItems regularFontWithSize:10] range:NSMakeRange(0, kPoweredBy.length + kInMoment.length)];
106+
} else {
107+
[attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:37/255 green:55/55 blue:70/255 alpha:1.0] range:NSMakeRange(0, 10)];
108+
[attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:37/255 green:55/55 blue:70/255 alpha:1.0] range:NSMakeRange(11, 8)];
109+
[attrStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:10] range:NSMakeRange(0, 19)];
110+
}
105111
[self.poweredByWootric setAttributedTitle:attrStr forState:UIControlStateNormal];
106112
[self.poweredByWootric addTarget:self
107113
action:NSSelectorFromString(@"openWootricHomepage:")

WootricSDK/WootricSDK/WTRiPADSurveyViewController+Views.m

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,15 @@ - (void)setupPoweredByWootric:(NSString *)text {
112112
self.poweredByWootric = [[UIButton alloc] init];
113113
[self.poweredByWootric setTranslatesAutoresizingMaskIntoConstraints:NO];
114114
NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:text];
115-
[attrStr addAttribute:NSForegroundColorAttributeName value:[WTRColor poweredByColor] range:NSMakeRange(0, kPoweredBy.length - 1)];
116-
[attrStr addAttribute:NSForegroundColorAttributeName value:[WTRColor iPadPoweredByWootricTextColor] range:NSMakeRange(kPoweredBy.length, kInMoment.length)];
117-
[attrStr addAttribute:NSFontAttributeName value:[UIItems regularFontWithSize:10] range:NSMakeRange(0, text.length)];
115+
if ([WTRColor poweredByColor] != nil && [WTRColor iPadPoweredByWootricTextColor] != nil && [UIItems regularFontWithSize:10] != nil && kPoweredBy.length > 1 && kInMoment.length > 1) {
116+
[attrStr addAttribute:NSForegroundColorAttributeName value:[WTRColor poweredByColor] range:NSMakeRange(0, kPoweredBy.length - 1)];
117+
[attrStr addAttribute:NSForegroundColorAttributeName value:[WTRColor iPadPoweredByWootricTextColor] range:NSMakeRange(kPoweredBy.length, kInMoment.length)];
118+
[attrStr addAttribute:NSFontAttributeName value:[UIItems regularFontWithSize:10] range:NSMakeRange(0, text.length)];
119+
} else {
120+
[attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:37/255 green:55/55 blue:70/255 alpha:1.0] range:NSMakeRange(0, 10)];
121+
[attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:37/255 green:55/55 blue:70/255 alpha:1.0] range:NSMakeRange(11, 8)];
122+
[attrStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:10] range:NSMakeRange(0, 19)];
123+
}
118124
[self.poweredByWootric setAttributedTitle:attrStr forState:UIControlStateNormal];
119125
[self.poweredByWootric addTarget:self
120126
action:NSSelectorFromString(@"openWootricHomepage:")

0 commit comments

Comments
 (0)