如何在 Objective-C 中从右上角淡入和展开模态框
How to fade in and expand a Modal from top right corner in Objective-C
我正在尝试让我的 CalendarFlyoutView 在 Xcode 和 Objective-C 中淡入并从右上角展开。这是实现文件中存在的方法:
- (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){
}];
}
如何使它从右上角淡入和展开?任何帮助将不胜感激。
这似乎是正确的,也许检查一下右上角的自动布局?这可能会导致问题...
我正在尝试让我的 CalendarFlyoutView 在 Xcode 和 Objective-C 中淡入并从右上角展开。这是实现文件中存在的方法:
- (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){
}];
}
如何使它从右上角淡入和展开?任何帮助将不胜感激。
这似乎是正确的,也许检查一下右上角的自动布局?这可能会导致问题...