Answer the question
In order to leave comments, you need to log in
Is it possible to change the location of the title in the button on Xcode?
Is it possible to change the location of the title (text) in the button on Xcode, through coding? So that not according to the standard in the center, top, bottom, left, right, but according to their coordinates.
Answer the question
In order to leave comments, you need to log in
//располагаем текст сверху слева
[button setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft];
[button setContentVerticalAlignment:UIControlContentVerticalAlignmentTop];
//двигаем текст вниз и вправо на 10 пикселей
[button setTitleEdgeInsets:UIEdgeInsetsMake(10.0f, 10.0f, 0.0f, 0.0f)];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question