robb / Cartography

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

Mac Catalyst issues #316

Open polymerchm opened 5 years ago

polymerchm commented 5 years ago

topLayoutGuide' was deprecated in Mac Catalyst 13.0: Use view.safeAreaLayoutGuide.topAnchor instead of topLayoutGuide.bottomAnchor

same for bottomLayoutGuide

pawelurb commented 5 years ago

Hi @polymerchm!

Could you provide more information about when you're encountering this warning? Maybe a piece of sample code?

It seems to me like you're trying to use the .bottomLayoutGuide and .topLayoutGuide APIs directly. These are indeed deprecated - as they were replaced by safeAreaLayoutGuide starting with iOS 11.

You can refer to official documentation to learn about safe areas. I highly encourage you to use them - especially when you're building for Mac Catalyst. 🙂

polymerchm commented 4 years ago

This code is in Cartography,

` public extension UIViewController { var car_topLayoutGuide : LayoutSupport { get { return LayoutSupport(layoutGuide: self.topLayoutGuide) } }

    var car_bottomLayoutGuide : LayoutSupport {
        get {
            return LayoutSupport(layoutGuide: self.bottomLayoutGuide)
        }
    }
}

`

rshimokura commented 4 years ago

Do you still have a schedule to fix this? It's been almost a year since last update. I hope "Cartography" will be continuing maintenance.