设置标题

迅速

button.setTitle(titleString, forState: controlState)

目标 C.

[button setTitle:(NSString *) forState:(UIControlState)];

将默认标题设置为 Hello World!

迅速

button.setTitle("Hello, World!", forState: .normal)

目标 C.

[button setTitle:@"Hello, World!" forControlState:UIControlStateNormal];