I will find out what the problem is. See below code.
MapView.m
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self performSelector:@selector(addMapView) withObject:nil afterDelay:2.0];
}
return self;
}
- (void) addMapView {
MKMapView *aMapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0, 321, 300)];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self cache:YES];
[self addSubview:aMapView];
[UIView commitAnimations];
}
And after that, just add an object of the MapView class where you want. as shown below.
mapView *aMapView = [[mapView alloc] initWithFrame:CGRectMake(0, 118, 321, 300)];
[[self view] addSubview:aMapView];
, .
,
MinuMaster.