I want to display asterisk symbol as superscript in my application. Is there any Unicode value for this?
Create a NSMutableAttributedString with the full string and default font. Add an attribute to the characters you want to change ( NSRange ), with the smaller/subscript UIFont , and the NSBaselineOffsetAttributeName value is the amount you want to offset it vertically. Assign it to your UILabel.
A view that displays one or more lines of informational text.
In Swift
version, simply copy this asterisk sign ⃰
and paste in your string or UILabel
text.
E.g. lblTest.text = "This is required field ⃰
This might help some other people who are seeking to put the asterisk sign in a simple string.
As per http://unicode.org/mail-arch/unicode-ml/Archives-Old/UML017/0066.html, there's no such thing as a "Superscript Asterisk" character in Unicode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With