UILabel Align Text to center

后端 未结 10 1727
心在旅途
心在旅途 2020-12-12 11:19

How do I align text in UILabel?

相关标签:
10条回答
  • 2020-12-12 11:51

    In xamarin ios suppose your label name is title then do the following

    title.TextAlignment = UITextAlignment.Center;
    
    0 讨论(0)
  • 2020-12-12 11:52

    For Swift 3 it's:

    label.textAlignment = .center
    
    0 讨论(0)
  • 2020-12-12 11:57

    IO6.1 [lblTitle setTextAlignment:NSTextAlignmentCenter];

    0 讨论(0)
  • 2020-12-12 12:03
    Label.textAlignment = NSTextAlignmentCenter;
    
    0 讨论(0)
提交回复
热议问题