how to add white space between Strings

1

Good,

I have 2 fields: First and Last name. in the exit the 2 names leave glued without space between them.

Of this I thank you for the help.

    
asked by anonymous 28.09.2016 / 16:21

2 answers

1

Just add the space in the string concatenation:

var texto1 = "" + Enter.text!
var texto2 = "" + Enter1.text!
myLabel.text = texto1 =  + " " + texto2
    
28.09.2016 / 16:33
0

Another way:

myLabel.text = "\(Enter.text!) \(Enter1.text!)"
    
17.10.2016 / 03:22