Check Mobile App
Read now
Start a Project

Changing Text Attribute Strings From The Attribute Inspector In Swift

Save

Hello guys, Today we learn about Changing Text Attribute Strings From The Attribute Inspector In Swift.

What is Attribute String:

Attribute strings are a set of character strings that have an individual character or range of characters. for more details please Click Here.


Getting Start:-


step1:- Firstly, create a new Xcode project.

File-> New-> Project-> Choose Ios-> choose App-> next and Add your project name then create.


Step2:- Then, create the design of the label on the storyboard

  1. Firstly, drag and drop the label on View Storyboad.

2. Then, select the label and go to the Attribute inspector section

And select label text Plain to Attribute

3. Now you can change your text accordingly.

For example:- If you want to change the color of the first word then you can just select the word and change the color or you can change the color of a character as well, Please see attached video

And, if you want to change the text in bold, underline, the italic format you need to just select the text and change the text into bold, underline e.t.c

Here are the two methods, just simply click on the T button, here you have a font box

  1. First, by using the font box, you can change the selected text size, change the text to bold, and italic attributes. Also you can change the text language. Please see attached video.

2. second, you just simply select the particular text and right-click and change the font to bold, underline, italic

Now, run your project and see the result-

Conclusion:-

In this blog, we discussed Changing text attribute strings from the storyboard attribute inspector in Swift

I hope this blog will help you to understand the attribute functionality of the storyboard.

Thanks for reading!!!

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

The support is fast and do everything in their power to make it perfect. If you need customization it's also done right away. I had massive research to select Mobikul and now I'm sure it was the right one.

Igor Souza

Igor Souza

Talk to Sales

Global

Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home