- button.titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
- button.titleLabel.textAlignment = NSTextAlignmentCenter;
- [button setTitle: @"Line1\nLine2" forState: UIControlStateNormal];
转载于:https://www.cnblogs.com/AnLinWaN/p/6163741.html
转载于:https://www.cnblogs.com/AnLinWaN/p/6163741.html