0

I have a Google IOS SDK Mapview which has a peer level view that is a UITableView.

I am trying to animate that once a cetain condition is met, the alpha be set to 1 and frame be that of the mapivew.

My code is

    [self.myTableView reloadData];
    CGRect fullViewFrame = self.mainMapView.frame;
    CGFloat originY = fullViewFrame.origin.y + [self.locationMaster count]/2*44;
    CGFloat originX = fullViewFrame.origin.x + (fullViewFrame.size.width - 560.0f)/2;
    CGFloat height = ([self.dataForTableArray count]+1)*44.0f;
    CGFloat width = 560.0f;
    CGRect targetFrame = CGRectMake(originX, originY, width , height);
    [UIView animateWithDuration:0.5
                          delay:0.0
                        options: UIViewAnimationCurveEaseOut
                     animations:^{
                         [self.progressTableView setFrame:targetFrame];
                         self.progressTableView.alpha = 1.0f;
                     }
                     completion:^(BOOL finished){
                         NSLog(@"Done!");
                     }];

I cant understand why it dosent work. What I can think of is that being a peer level view to google map sdk and placed on top of GoogleMap SDK view the animations are not correctly displayed.

Anyone with any corrections or ideas ?

DrBug
  • 2,004
  • 2
  • 20
  • 21
  • What does it do? Add some logging to the frame so you can see where you're sending it to. – Wain Aug 18 '13 at 08:25
  • I don't see where you're setting alpha to anything other than 1.0f to begin with. If you animate setting the alpha to 1.0f but it already is, you're not going to get any animation. Other than that, it would help if you provide specifics as to the nature of the problem (is there any change at all during the animation, or are neither the frame nor the alpha being animated, or what? – RegularExpression Aug 18 '13 at 08:45
  • I am setting the alpha and frame in the animation block. The alpha is animating correctly. The frame is not. – DrBug Aug 18 '13 at 09:34

0 Answers0