Reputation: 91
I have a collection of NSString objects that contain arabic text. However, when I try to display any of them using a UILabel, the text shows left-to-right instead of right-to-left (NSLog shows the strings properly)
I am thinking about a work-around, applying a transform to the UILabel to make a y-axis symmetry, but how can I detect if a NSString contains a RTL string?
Upvotes: 0
Views: 1343
Reputation: 736
Try prepending the unicode character 0x200F to the beginning of each string. This character is an invisible marker character that indicates text directionality.
Upvotes: 1
Reputation: 58786
Have you tried setting your region to Arabic? I would have thought this type of thing would be handled automatically.
Upvotes: 0