당신이 당신의 .H 파일을 가져 오는 당신의 도움에 대한
@interface CoreLocationDemoViewController : UIViewController <CoreLocationControllerDelegate> {
CoreLocationController *CLController;
IBOutlet UILabel *speedLabel;
IBOutlet UILabel *latitudeLabel;
IBOutlet UILabel *longitudeLabel;
IBOutlet UILabel *altitudeLabel;
IBOutlet UILabel *timeLabel;
}
감사 : 여기
- (IBAction)insert:(id)sender
{
// create string contains url address for php file, the file name is phpFile.php, it receives parameter :name
//NSString *strURL = [NSString stringWithFormat:@"http://localhost/phpFile.php?name=%@",txtName.text];
NSString *strURL = [NSString stringWithFormat:@"http://localhost/phpFile.php?name=%@",speedLabel.text]; ************< use of undefined identifier 'speedLabel'****
// to execute php code
NSData *dataURL = [NSData dataWithContentsOfURL:[NSURL URLWithString:strURL]];
// to receive the returend value
NSString *strResult = [[[NSString alloc] initWithData:dataURL encoding:NSUTF8StringEncoding]autorelease];
NSLog(@"%@", strResult);
}
가 speedLabel가 포함되어있는 구조입니다
#import "CoreLocationDemoViewController.h"
코드에서 결함이 전혀 보이지 않습니다.
해당 코드는 @implementation
및 @end
범위 내에서 호출됩니까? 당신은 속성으로 선언하고 다음 작업을 수행하고 있습니까 @synthesize
그것은
내가 유래 어딘가에서 발견 않았다 아래의 기술을 사용 않았다 GPS 인터페이스에서 오는 변수를보기 위해
무슨 문제? 아니면 우리가 당신을 위해 모든 MySQL 코드를 복사하기를 원합니까? – MCKapur
안녕하세요, 제가 가지고있는 문제는 아래의 speedLabel 변수에 액세스 할 수 없다는 것입니다. NSString * strURL = [NSString stringWithFormat : @ "http : //localhost/phpFile.php? speedLabel = % @", speedLabel.text]; 내 코드에서 시도 할 때 정의되지 않은 식별자 speedLabel 사용 오류가 있습니다. 감사 Regisma – user1961175