如何从NSArray中删除括号((909093498))?

时间:2016-12-15 20:33:03

标签: objective-c sqlite nsstring

    // 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元素转换为NSIntegerlong,以便对其进行一些算术运算。我尝试了很多代码,但收到的错误是:

[__NSArrayM stringByReplacingOccurrencesOfString:withString:]: unrecognized selector sent to instance

0 个答案:

没有答案
相关问题