Unable to retrieve updatedAt or createdAt values from Parse objects

后端 未结 3 2031
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-07 16:10

I\'m an experienced Android developer trying to get a prototype iOS app running using the Parse service and sdk (https://www.parse.com/).

It\'s great, and i can get all

3条回答
  •  北海茫月
    2021-02-07 16:27

    Silly Matt. I think about this for a day then realise my mistake minutes after i post it.

    updatedAt is a property on all PFObjects, no need to retrieve it using a key.

    Given a PFObject named object...

     NSDate *updated = [object updatedAt];
     NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
     [dateFormat setDateFormat:@"EEE, MMM d, h:mm a"];
     cell.detailTextLabel.text = [NSString stringWithFormat:@"Lasted Updated: %@", [dateFormat stringFromDate:updated]];
    

    Working Date String

    @Parse , tip of the hat

提交回复
热议问题