Questions tagged text

Explore the latest questions and answers asked by our top developers.

Fix line spacing in custom font in SwiftUI

I am using custom font (Catamaran) and it seems like it has big space between lines in it. For example I have this code: Text("Example text that has big space between lines") .lineSpacing(0) .padding(.horizontal) .font(Font.custom(FontNameManager.Catamaran.bold, size: 24.0)) .foregroundColor(.white) .multilineTextAlignment(.center) and it looks like this: As you can see it doesn’t have zero space between lines […]

By Libor Zapletal
Published
Categorised as fonts, ios, line-spacing, swiftui, text Tagged , , , ,

How do I allow text selection on a Text view in SwiftUI?

When I create a text view: Text(“Hello World”) I can’t allow the user to select text when they long press. I’ve looked at using a TextField but that doesn’t seem to allow for turning off text editing. I just want to be able to display a body of text and allow the user to highlight […]

By mralexhay
Published
Categorised as ios, swift, swiftui, text

How do I allow text selection on a Text label in SwiftUI?

When I create a text view: Text(“Hello World”) I can’t allow the user to select text when they long press. I’ve looked at using a TextField but that doesn’t seem to allow for turning off text editing. I just want to be able to display a body of text and allow the user to highlight […]

By mralexhay
Published
Categorised as ios, swift, swiftui, text

Cannot turn autoCorrect to {false} in react native TextInput

On my TextInput change text, I detect whether the user pushed the @ button for mentions. onChangeText(text){ const suggestTrigger = text.match(/[email protected][A-Za-z0-9]*$/i) //grab “@” trigger const searchQuery = (suggestTrigger && suggestTrigger.length > 0) ? suggestTrigger[0] : null; this.setState({ searchQuery: searchQuery }) } Then, in my render, I do: <TextInput autoCapitalize={this.state.searchQuery ? “none” : “sentences”} autoCorrect={this.state.searchQuery ? […]

By TIMEX
Published
Categorised as ios, keyboard, react-native, text

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq