Cannot AddObject to NSMutableArray from Block

后端 未结 2 626
野性不改
野性不改 2021-01-23 17:32

I have a feeling that my problem here is really with blocking, but maybe it\'s something else too. I am trying to forward geocode an address and place the coordinates into an ar

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-23 18:17

    __block NSMutableArray *coordinates = [[NSMutableArray alloc] initWithCapacity:0];
    

    The problem is here; just replace the above code with:

    NSMutableArray *coordinates = [[NSMutableArray alloc] init];
    

提交回复
热议问题