CosmicMind / CosmicMind/Material

TextField left view rect not returning correct size

Open
#1,298 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
12k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

![image](https://user-images.githubusercontent.com/274318/81769627-6c339280-9521-11ea-8be7-d4b00f88cda7.png)

My current resolution is to subclass the `TextField` & override:

```
override public func leftViewRect(forBounds bounds: CGRect) -> CGRect {
return .init(origin: .zero, size: .init(width: leftViewWidth, height: bounds.height))
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.