robb / Cartography

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

How to use multiply #320

Open bimawa opened 3 years ago

bimawa commented 3 years ago

I not found example with working multiply solution. On next my code:

  constrain(view, searchImage, coverLabel) { (view, searchImage, coverLabel) in
            searchImage.top == (view.height * CGFloat(0.59))
            searchImage.centerX == view.centerX
            searchImage.leading >= view.safeAreaLayoutGuide.leading + 12.0
            searchImage.trailing <= view.safeAreaLayoutGuide.trailing - 12.0
            coverLabel.top == searchImage.bottom + 32.0
        }

I got next compile error:

Build target AppTest
Compile Swift source files
Compile ViewController.swift
(178, 29) Binary operator '==' cannot be applied to operands of type 'Edge' and 'Expression<Dimension>'
(178, 29) Overloads for '==' exist with these partially matching parameter lists: (P, Expression<P>), (P, P)
Build failed with 1 error and 143 warnings in 43 s 83 ms

How work correctly with it?