Where do I place code allowing for more lines on UILabel?

52 Views Asked by At

I want to add a second line to my UILabel but I have no idea where to put the code and I am stuck without it. #import

@interface ViewController : UIViewController{

IBOutlet UITextField *TramNumber;
IBOutlet UILabel *Tramresult;



}
- (IBAction)Button:(id)sender;
- (IBAction)DismissKeyboard;



@end

This is the code in my ViewController.h, Tramresult is my UILabel.

1

There are 1 best solutions below

2
Reconquistador On BEST ANSWER

You can do it in Interface builder (probably best for you), or in any place of code. In that case the best place will be ViewDidLoad:

- (void)viewDidLoad {

    [super viewDidLoad];
    // Do any additional setup after loading the view.

    [Tramresult setNumberOfLines:0];  
}