How to clear the cache of mkmapview

前端 未结 2 2059
小鲜肉
小鲜肉 2021-01-16 10:22

In my app.I have a one textfield and one search button.when it user click on search button after fill up the address on textfield my app shows the result and place a pin on

相关标签:
2条回答
  • 2021-01-16 10:47

    Try This

    NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil]; 
    
    [NSURLCache setSharedURLCache:sharedCache];
     [sharedCache release];
    
    0 讨论(0)
  • 2021-01-16 10:53

    Just to update, since I was looking for this. Seems a bit cleaner

    [[NSURLCache sharedURLCache] removeAllCachedResponses];
    
    0 讨论(0)
提交回复
热议问题