Array retuning a blank array outside of PFQuery with Parse.

前端 未结 3 465
难免孤独
难免孤独 2021-01-27 22:42

Array returning a blank array when outside of the PFQuery. For some reason, the items are not being passed to the array when compiled.

class DriverViewController         


        
3条回答
  •  深忆病人
    2021-01-27 23:28

    query.findObjectsInBackgroundWithBlock is a block operation that performs in the background - it's asynchronous.

    The line println(placesArr) actually executes before the block is finished - that's why you see nil there.

提交回复
热议问题