Varun Varahabotla
Varun Varahabotla

Reputation: 548

How to fade in and expand a Modal from top right corner in Objective-C

I am trying to get my CalendarFlyoutView to Fade in and expand from the top right corner in Xcode and Objective-C. This is the method existing in the implementation file:

- (void)presentInView:(UIView *)holderView completion:(void (^) (void))completion
{
    // make this view stretch
    CGRect upperRightR = CGRectMake (CGRectRight (holderView.bounds), 0, 1, 1);
    [self setFrame:upperRightR];
    self.clipsToBounds = YES;
    self.alpha = 0.0;

    [holderView addSubview:self];

    [UIView animateWithDuration:kAnimation_ExpandCalendarDuration
        animations:^{
          [self setFrame:holderView.bounds];
          self.alpha = 1.0;
        }
        completion:^(BOOL finished){
        }];
}

How do you get this to fade in and expand from the top right corner? Any help would be greatly appreciated.

Upvotes: 0

Views: 116

Answers (1)

kebabTiger
kebabTiger

Reputation: 652

This seems correct, maybe check the auto-layout for the top right corner? This could cause the issue...

Upvotes: 1

Related Questions