Ecco il mio codiceè possibile regolare la posizione x, y titleLabel di UIButton?
UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btn setFrame:CGRectMake(0.0f, 0.0f, 100.0f, 100.0f)];
[btn setTitle:[NSString stringWithFormat:@"Button %d", i+1] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside];
btn.titleLabel.frame = ???
Scegliere l'altra risposta in modo che possiamo eliminare quello molto negativo. Oppure spiega perché l'hai fatto. – tchrist
Perché questa risposta non è accettata? –
Questo è tutto ciò che serve http://stackoverflow.com/questions/18484747/uibutton-titleedgeinsets –