How to move UItableView section text from left to right?
-
09-10-2019 - |
Pergunta
I found some answers of how you can move the cell text to the right, BUT HOW can I move the section's text to the right?
Solução
If by "section's text" you mean the text in the header for the section, you'll need to switch from using tableView:titleForHeaderInSection:
in your data source to supplying a custom UILabel
with textAlignment
set to UITextAlignmentRight
via tableView:viewForHeaderInSection:
in your delegate.
Outras dicas
Instead of -tableView:titleForHeaderInSection:
, override -tableView:viewForHeaderInSection:
and return a custom view for each section. You can format it in any way you want.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow