@property (weak, nonatomic) IBOutlet UITextField *Text1;
@property (weak, nonatomic) IBOutlet UITextField *Text2;
@property (weak, nonatomic) IBOutlet UILabel *result;
- (IBAction)GetResult:(id)sender {
NSString * t1 = [_Text1 text];
NSString * t2 = [_Text2 text];
NSInteger tt1 = [t1 integerValue];//将指针转换成long型
NSInteger tt2 = [t2 integerValue];
NSInteger a = tt1 +tt2;
[_result setText:[NSString stringWithFormat:@"%ld",a]]; //在_result中显示结果
[self.view endEditing:YES];//关闭键盘
}