Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 5e8aa68

Browse files
authored
Merge pull request #46 from inloop/bugfix/textfield_apply_base_style
FIX: Apply base style to text field causes crash
2 parents 18bc943 + 7c78c5d commit 5e8aa68

File tree

7 files changed

+17
-18
lines changed

7 files changed

+17
-18
lines changed

Example/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
2-
- Styles (0.14.8)
3-
- Styles/Tests (0.14.8)
2+
- Styles (0.15.9)
3+
- Styles/Tests (0.15.9)
44

55
DEPENDENCIES:
66
- Styles (from `../`)
@@ -11,7 +11,7 @@ EXTERNAL SOURCES:
1111
:path: ../
1212

1313
SPEC CHECKSUMS:
14-
Styles: af5e6b6920360e9a71b84a1776b721f5ef4c257c
14+
Styles: 5922b6d6b0f130580487821bf4f6cdd1918c93c1
1515

1616
PODFILE CHECKSUM: f5341d1bc44d76e5ca1e0d50940004053970d8dc
1717

Example/Pods/Local Podspecs/Styles.podspec.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Manifest.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/Styles/Info.plist

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Styles.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'Styles'
11-
s.version = '0.14.8'
11+
s.version = '0.15.9'
1212
s.summary = 'UI Elements rapid styling'
1313
s.description = <<-DESC
1414
UIElements styling made easy, declarative and rapid.

Styles/Classes/UIElement+Extensions/UITextField+Styles.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,21 @@ - (void)swizzle_awakeFromNib {
8282

8383
- (void)setTextStyle:(TextStyle *)style forState:(TextInputState)state {
8484
self.textStyles[@(state)] = style;
85-
[self applyStyle];
85+
[self applyStyleForCurrentState];
8686
}
8787

8888
- (void)setViewStyle:(ViewStyle *)style forState:(TextInputState)state {
8989
self.viewStyles[@(state)] = style;
90-
[self applyStyle];
90+
[self applyStyleForCurrentState];
9191
}
9292

9393
- (void)setPlaceholderStyle:(TextStyle *)style forState:(TextInputState)state {
9494
self.placeholderStyles[@(state)] = style;
95-
[self applyStyle];
95+
[self applyStyleForCurrentState];
9696
}
9797

98-
- (void)applyStyle {
99-
[super applyStyle];
98+
- (void)applyStyleForCurrentState {
99+
[self applyStyle];
100100
TextInputState state = [self isEditing] ? kEditing : kInactive;
101101
[self updateStylesForState:state];
102102
}

Styles/Classes/UIElement+Extensions/UITextView+Styles.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ - (void)setViewStyle:(ViewStyle *)style forState:(TextInputState)state {
8484
- (void)applyStylesForState:(TextInputState)state {
8585
ViewStyle *viewSyle = self.viewStyles[@(state)];
8686
TextStyle *textStyle = self.textStyles[@(state)];
87-
87+
8888
[self applyTextStyle:textStyle];
8989
[self applyViewStyle:viewSyle];
9090
}
@@ -94,7 +94,7 @@ - (void)textViewEditingDidChange:(NSNotification *)notification {
9494
return;
9595
}
9696
TextInputState state = notification.name == UITextViewTextDidBeginEditingNotification ? kEditing : kInactive;
97-
[super applyStyle];
97+
[self applyStyle];
9898
[self applyStylesForState:state];
9999
}
100100

@@ -114,4 +114,3 @@ - (void)applyViewStyle:(ViewStyle *)style {
114114
}
115115

116116
@end
117-

0 commit comments

Comments
 (0)