Nau*_*tak 0 iphone objective-c
我想从用户获取两个值,即名称和位置,然后想要将它们连接成单个字符串以生成输出字符串
IBOutlet UITextField *txtName;
IBOutlet UITextField *txtLoc;
想要连接它们以生成下面的字符串.
学生姓名是txtName,他来自txtLoc
基本上这是我的完整代码.
NSString *message = [NSString stringWithFormat:@"Student Name is %@  from  %@ phone Number is%@ and he want to say%", txtName.text, txtLoc.text,txtPho.text,txtBody.text];
-(void) send:(id) sender {
    [self sendEmailTo:@"naumankhattak@gmail.com" withSubject:@"Contact for Quran Focus from iphone Application" withBody:message];
这就是我想要做的.而且他们得到了错误
这里'txtName'未声明(不在函数中)
'txtLoc'在此处未声明(不在函数中)'txtPho'未声明此处(不在函数中)'txtBody'未声明此处(不在函数中)
虽然我已经正确地宣布所有出口.
NSString *result = [NSString stringWithFormat:@"Student Name is %@ and He is from %@", txtName.text, txtLoc.text];
| 归档时间: | 
 | 
| 查看次数: | 1927 次 | 
| 最近记录: |