vicsonic
vicsonic

Reputation: 83

MKMapView gets blank after resize in iOS 6

I'm having a weird issue when I resize a MKMapView in iOS 6. Basically this is my escenario:

I have a UITableView showing a MKMapView in every cell.

In iOS 5 it looks like this:

http://cl.ly/image/0e0R1623413s

And in iOS 6 it looks like this:

http://cl.ly/image/2C041E3B3k1X

When the cell is selected I call an UITableViewView beginUpdates, endUpdates block, to change the size of the cell and with the autoresizing mask of the MKMapView it gets resized.

[self.tableView beginUpdates];
[self.tableView endUpdates];

After the beginUpdates, endUpdates block this is what I get in iOS 5 (it works like charm):

http://cl.ly/image/3Q0O0q1S0E3N

But in iOS 6 the MKMapView gets blank showing only the 'Legal' link

http://cl.ly/image/443x2r2D3l44

I've couldn't found any useful information about this issue and I'm getting crazy about this. The only reference I got about a similar problem is this thread in the Apple Developer forums:

https://devforums.apple.com/message/733353#733353

However, the problem is different and the only advice is to do the things on main thread and with the MKMapView visible. In my case the animation is made on the main thread and the view is also visible, so that's not the problem apparently.

Does anyone have some advice, thought or idea to solve this issue?

Thanks in advance.

Upvotes: 3

Views: 885

Answers (1)

Angus
Angus

Reputation: 126

I have a similar problem after I upgrade my app to iOS6. I suspect that it is related to the selection style. My workaround is to set selectionStyle to UITableViewCellSelectionStyleNone. My map views do not disappear anymore. You can try to see if that helps.

Upvotes: 11

Related Questions