ios - 如何在 Objective-C 中从右上角淡入和展开模态框

标签 ios objective-c uiview

我正在尝试让我的 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){
        }];
}

如何让它淡入并从右上角展开?任何帮助将不胜感激。

最佳答案

这似乎是正确的,也许检查右上角的自动布局?这可能会导致问题...

关于ios - 如何在 Objective-C 中从右上角淡入和展开模态框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32126064/

相关文章:

ios - Ad Hoc 分发应用程序是灰色的,从 iTunes 传输到 iPhone 后

swift - 即使在同一 Controller 中, socket 为零

ios - 如何在一个 NSFetchRequest 中获取核心数据关系?

ios - 为什么 `pod install`会改变PODS_ROOT路径?

ios - 如何? UISplitViewController TableCell 图像

iphone - 从具有 BOOL 值的 plist 问题中读取 NSDictionary

ios - block 内返回

ios - UIView ClipsToBounds 不起作用

ios - Swift 2.2 中的 UIButton。如何添加不同的目标?

ios - 使用 iboutlet tableview Swift 子类化