views:

23

answers:

1

I'm using Hebrew language in my app. This langauge is read from right to left. I'm using UIButton and setting text programatically. Also i'm using following lines of code to set the button labels properties.

    [myButton.titleLabel setNumberOfLines:2];
[myButton.titleLabel setTextAlignment:UITextAlignmentRight];
[myButton.titleLabel setLineBreakMode:UILineBreakModeWordWrap];

If the text is occupying only one line its fine. But when text is double line, both the lines are showing, but it appears as if some tab space is given in first line. (similar to paragraph start) How can I make both the lines are right aligned one below other?

A: 

I'm using XML to read the text to display on buttons. After reading from XML, strip the pre & post spaces/tabs etc. This solved the problem.

Satyam svv