1

我有这两个输入

// @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;
}
4

1 回答 1

1

尝试

self.userOutput.text = [self.userInput.text stringByAppendingString:self.userSecondInput.text];
于 2012-10-06T17:57:14.903 回答