alamofire, downloading multiple images

时间:2015-07-29 00:14:20

标签: ios swift alamofire

Im attempting to download an image from a url and make it the tableviewcell image for each cell in the table view. The program downloads the contents of each cell and then uses alamofire to download the image according to the id value passed in from the server.

When i use the code below, the first image is always the same as the second and i cannot figure out why, when I add more cells they work perfectly. I only just started using alamofire today, so im possibly missing something obvious, sorry in advance if thats the case.

@Stateless
public class SomeServiceImpl implements SomeService {
    @PersistenceContext(unitName = "my-pu")
    private EntityManager em;

    @Override
    public void updateCategory(SomeClass theclass) {
        em.merge(theclass);
    }
}

1 个答案:

答案 0 :(得分:0)

I have identified the issue is server side, when i change the images they are not being changed on the server instantly - alamofire is working fine

  • i originally made the first cell image the image that should be for number 2, after i moved it, alamofire had cached it so it was always displaying the image intended for number 2