robb / Cartography

A declarative Auto Layout DSL for Swift :iphone::triangular_ruler:
Other
7.35k stars 524 forks source link

Consider to bring back topLayoutGuideCartography and bottomLayoutGuideCartography #287

Closed khanhshopback closed 6 years ago

khanhshopback commented 6 years ago

I was using those two edges, but look like they were removed after I upgraded to 3.0.1 Can we bring them back? Or any reason why you removed it?

corujautx commented 6 years ago

It was removed because Cartography now supports constraining UILayoutSupports and UILayoutGuides by using the constrain function.

Consider replacing your code where topLayoutGuideCartography is used to something akin to:

constrain(view, self.car_topLayoutGuide) { view, guide in 
     view.top == guide.bottom
}
khanhshopback commented 6 years ago

I see. Thank @corujautx