// Form the query.
NSString *query = [NSString stringWithFormat:@"select firstTimeStamp from activityTimeStamp where userId=\"%@\" And buddyId=\"%@\"",[PFUser currentUser].username,buddyId];
// Get the results.
if (self.arrTimeStampInfo != nil) {
self.arrTimeStampInfo = nil;
}
// Getting Data into Array
self.arrTimeStampInfo = [[NSArray alloc] initWithArray:[self.dbManager loadDataFromDB:query]];
// Get the results.
if (self.arrTimeStampInfo != nil) {
self.arrTimeStampInfo = nil;
}
NSLog(@"Array containing records%@", self.arrTimeStampInfo);
and it prints ( (1111132324) )
NSString *string = [_arrTimeStampInfo objectAtIndex: 0];
NSLog(@"this is string timestamp %@",string);
我无法成功将NSarray
元素转换为NSInteger
或long
,以便对其进行一些算术运算。我尝试了很多代码,但收到的错误是:
[__NSArrayM stringByReplacingOccurrencesOfString:withString:]: unrecognized selector sent to instance