Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

自定义MMPopupView出现宽高为0的看过来 #87

Description

@iOS-Kel

继承MMPopupView自定义的view,在执行show或showWithBlock之后,要么使用masonry设置其宽高约束;要么能通过内容约束计算出view的大小。不能直接设置frame。举个例子:
@interface FKGenderView : MMPopupView
@EnD
@implementation FKGenderView

  • (void)show {
    [self showWithBlock:nil];

}

  • (void)showWithBlock:(MMPopupCompletionBlock)block {
    [super showWithBlock:block];

    [self mas_makeConstraints:^(MASConstraintMaker *make) {
    make.width.height.equalTo(self.superview);
    }];
    }
    @EnD
    [customPopupVIew mas_makeConstraints:^(MASConstraintMaker *make) {
    make.width.height.equalTo(self.superview);
    }];

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions