Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 51d6e2e

Browse files
committed
Fix rendering problem and update to 0.3.1
1 parent 32ce7c5 commit 51d6e2e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

AnimatedTextInput.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 = 'AnimatedTextInput'
3-
s.version = '0.3.0'
3+
s.version = '0.3.1'
44
s.summary = 'UITextField and UITextView replacement with animated hint and error message support. Highly customizable. Used in Jobandtalent iOS app'
55

66
s.description = <<-DESC

AnimatedTextInput/Classes/AnimatedTextInput.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ public class AnimatedTextInput: UIControl {
128128
placeholderLayer.fontSize = fontSize
129129
placeholderLayer.font = style.textInputFont
130130
placeholderLayer.contentsScale = UIScreen.mainScreen().scale
131-
placeholderLayer.frame = CGRect(origin: placeholderPosition, size: CGSize(width: bounds.width, height: fontSize))
131+
placeholderLayer.backgroundColor = UIColor.redColor().CGColor
132+
// Some letters like 'g' or 'á' were not rendered properly, the frame need to be about 20% higher than the font size
133+
let frameHeightCorrectionFactor: CGFloat = 1.2
134+
placeholderLayer.frame = CGRect(origin: placeholderPosition, size: CGSize(width: bounds.width, height: fontSize * frameHeightCorrectionFactor))
132135
layer.addSublayer(placeholderLayer)
133136
}
134137

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ iOS custom text input component used in the [Jobandtalent app](https://itunes.ap
99
Use cocoapods to install this custom control in your project.
1010

1111
```
12-
pod 'AnimatedTextInput', '~> 0.3.0'
12+
pod 'AnimatedTextInput', '~> 0.3.1'
1313
```
1414

1515
## Usage

0 commit comments

Comments
 (0)