Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to modify UITextField text font? #47

Open
Channe opened this issue Oct 11, 2024 · 0 comments
Open

How to modify UITextField text font? #47

Channe opened this issue Oct 11, 2024 · 0 comments

Comments

@Channe
Copy link

Channe commented Oct 11, 2024

        VStack(justifyContent: .center, alignItems: .center) {
            ViewComponent(view: UITextField())
                .placeholder("input")
                .text(self.viewModel.image)
                .font(.systemFont(ofSize: 16))
                .textColor(.blue)
                .size(width: .fill)
                .inset(5)
                .update {
                    $0.layer.borderColor = UIColor.black.cgColor
                    $0.layer.borderWidth = 1
                    $0.layer.cornerRadius = 6
//                    $0.font = .systemFont(ofSize: 16)
                }
                .inset(10)
        }

.font(.systemFont(ofSize: 16))
Setting the font doesn't take effect and gets overridden by the font in the extension Component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant