我有这两个输入
// @property (strong, nonatomic) IBOutlet UILabel *userOutput;
@property (strong, nonatomic) IBOutlet UITextField *userInput;
@property (strong, nonatomic) IBOutlet UITextField *userSecondInput;
我希望发件人将两个输入组合在输出上作为单行显示
- (IBAction)setOutput:(id)sender {
self.userOutput.text=self.userInput.text;
}
答案 0 :(得分:1)
尝试
self.userOutput.text = [self.userInput.text stringByAppendingString:self.userSecondInput.text];