Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/107.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios PFQuery未获取标识符_Ios_Parse Platform_Pfquery - Fatal编程技术网

Ios PFQuery未获取标识符

Ios PFQuery未获取标识符,ios,parse-platform,pfquery,Ios,Parse Platform,Pfquery,在第一个PFQuery(乘客)中,我得到了几种含义,其中有时是相距很远的特殊标识符,必须在第二个PFQuery(trip)中传输数据。来自第一个标识符的数据必须在GetObjectInBackgroundHitid:XXXX(类行程)中传递。我该怎么做 - (void)viewDidLoad { UISwipeGestureRecognizer *gestureRight; gestureRight = [[UISwipeGestureRecognizer alloc] initWithTarg

在第一个PFQuery(乘客)中,我得到了几种含义,其中有时是相距很远的特殊标识符,必须在第二个PFQuery(trip)中传输数据。来自第一个标识符的数据必须在GetObjectInBackgroundHitid:XXXX(类行程)中传递。我该怎么做

- (void)viewDidLoad {
UISwipeGestureRecognizer *gestureRight;
gestureRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRight:)];
[[self view] addGestureRecognizer:gestureRight];

PFQuery *passenger = [PFQuery queryWithClassName:@"ClubWorld"];
[passenger getObjectInBackgroundWithId:@"zB96iIkoqo" block:^(PFObject *ClubWorld, NSError *error) {
    // Do somethi   ng with the returned PFObject in the gameScore variable.
NSLog(@"%@", ClubWorld);
    self.firstName.text = ClubWorld[@"firstName"];
    self.lastName.text = ClubWorld[@"lastName"];
    self.Mileage.text = ClubWorld[@"clubMiles"];
    self.withBAFrom.text = ClubWorld[@"withBAFrom"];
    self.withFCFrom.text = ClubWorld[@"withFCFrom"];
    self.fundsSpent.text = ClubWorld[@"fundsSpent"];
    self.lastTrip.text = ClubWorld[@"lastTrip"];
    self.previoustripObjectID = ClubWorld[@"lastTrip"];
}];

PFQuery *trip = [PFQuery queryWithClassName:@"Trips"];
[trip getObjectInBackgroundWithId:self.previoustripObjectID block:^(PFObject *TripInformation, NSError *error) {
    // Do something with the returned PFObject in the gameScore variable.
NSLog(@"%@", TripInformation);
    self.fromCountry.text = TripInformation[@"fromCountry"];
    self.toCountry.text = TripInformation[@"toCountry"];
    self.departureAirport.text = TripInformation[@"departureAirport"];
    self.arrivalAirport.text = TripInformation[@"arrivalAirport"];
    self.earnedMiles.text = TripInformation[@"earnedMiles"];
    self.flightClass.text = TripInformation[@"flightClass"];
    self.departureTime.text = TripInformation[@"departureTime"];
    self.arrivalTime.text = TripInformation[@"arrivalTime"];
    self.flightCost.text = TripInformation[@"flightCost"];
}];

[super viewDidLoad];

}

在PassengerViewController中。h需要编写以下代码:

@property (strong, nonatomic) NSString *previoustripObjectID;

在PassengerViewController.m中,需要编写以下代码:

@property (strong, nonatomic) NSString *previoustripObjectID;
-


错误到底是什么?我需要传输来自PFQuery*乘客在PFQuery*tripNSLog(@“%@”,ClubWorld);//从服务器解析中获取答案。[trip GetObjectInBackgroundHiId:NEED_INSERT_OBJECT//这里我需要插入一个我用NSLog收到的值,我不能传递我收到的值。你说的self.lastTrip.text不能作为objectID使用?我试着插入值_lastTrip,self.lastTrip.text,什么都没有。我可以告诉你如何运行程序。也许n的例子会更清楚吗?