Multiline title button iOS swift
Solution:
The below code is used for set the multiline text to a button in iOS.
iOS 6 and above we can use the below code...
The below code is used for set the multiline text to a button in iOS.
iOS 6 and above we can use the below code...
btn.titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
btn.titleLabel.textAlignment = NSTextAlignmentCenter;
Below iOS 6 use the below code:
btn.titleLabel.lineBreakMode = UILineBreakModeWordWrap;
btn.titleLabel.textAlignment = UITextAlignmentCenter;
Comments
Post a Comment