Masonry icon indicating copy to clipboard operation
Masonry copied to clipboard

How to use UILayoutGuide with Masonry?

Open GR-harry opened this issue 7 years ago • 6 comments

I find Snapkit can use like this:

 let guide = UILayoutGuide()
someView.addLayoutGuide(guide)

guide.snp.makeConstraints { make in
    make.width.equalToSuperview()
    make.height.equalTo(100)
    make.top.equalToSuperview()
} 

Is it possible to set constraints on a UILayoutGuide using Masonry?

GR-harry avatar Nov 03 '17 06:11 GR-harry

I have the same questions!

dkv587 avatar Nov 06 '17 07:11 dkv587

I have the same questions!

pengzz avatar Jan 04 '18 09:01 pengzz

We should put together a PR for this, as I use layout guides all over the place and adding support wouldn't be too much trouble.

DreamingInBinary avatar Feb 15 '18 16:02 DreamingInBinary

I have the same questions, too.

Zhangguiguang avatar Jul 01 '20 02:07 Zhangguiguang

Masonry can't use UILayoutGuide, but your can use a UIView to do so. create a simple blank view without background, to use 'mas_makeConstraints:'

pengzz avatar Jul 01 '20 02:07 pengzz

Try this PR please.

https://github.com/SnapKit/Masonry/pull/594

cntrump avatar May 30 '21 16:05 cntrump