iphone - Mysterious borders during MKMapView animation -


I have a UIView in which I flick between a UITableView and a MKMapView. MKMapView is built on runtime and animated in the following functions:

  [UIView startAnimations: zero reference: NULL]; [UIView Set Animation Duration: 0.5]; [UIView setAnimationTransition: (self.mapView == Zero? UIViewAnimationTransitionFlipFromRight: UIViewAnimationTransitionFlipFromLeft) See: self.topView cache: yes]; // See the new map if necc if (self.mapView == blue) {self.mapView = [[VTMapView alloc] initWithFrame: self.topView.bounds]; MapView.mapType = MKMapTypeStandard; MapView.delegate = self; MapView.scrollEnabled = Yes; MapView.zoomEnabled = Yes; MapView.showsUserLocation = Yes; } // Map showing? Show or hide if (Show! Mapemisible] [tableView.hidden = YES; [Self.topView insertSubview: see above mapSubview: self.tableView]; MapLoadCount = 0;} and {tableView.hidden = NO; [View MapDropRiverview] ;} [UIView commitAnimations];  

The first time it works well, but runs in the future horizontal bars above and below the map view during the animation. Something looks like this:

alt text

I tried to play with the 'cache setting' Is the other scenes Etc. It is not in the simulator, but it happens on the OS 4.1.x and 3.1.x.

If I see the code of table instead of gray So, I think the mapview is being changed incorrectly during the flip.

Change this row:

  UIView SetAnimation Transition: (self.mapView == Zero? UIViewAnimationTransitionFlipFromRight: UIViewAnimationTransitionFlipFromLeft) See: Self.topView Sh: Yes];  

In this line:

  UIView Set Animation Transition: (self.mapView == Zero? UIViewAnimationTransitionFlipFromRight: UIViewAnimationTransitionFlipFromLeft) See for yourself: self.topView cache: No];  

And this is the answer.


Comments