nnhubbard / ZSSRichTextEditor

A beautiful rich text WYSIWYG editor for iOS with a syntax highlighted source view
MIT License
3.78k stars 584 forks source link

Reframe WkWebView for a specific size. #248

Open pc23pankaj opened 4 years ago

pc23pankaj commented 4 years ago

Hi, i want to reframe the WkWebView according to my CGRectMake, Because I have to add other Objects on my ViewController. Currently, it is taking the whole self.view size. please suggest me.

yegail commented 4 years ago

set self.editorView and self.sourceView frame

like:

 [self.viewRichTextContent addSubview:self.sourceView];
 __weak typeof(self) weakSelf = self;
[self.editorView mas_makeConstraints:^(MASConstraintMaker *make) {
    make.top.equalTo(weakSelf.viewRichTextContent);
    make.left.right.equalTo(weakSelf.viewRichTextContent).inset(5);
    make.bottom.equalTo(weakSelf.viewRichTextContent).inset(1);
    make.height.mas_equalTo(DefaultEditViewHeight);
}];