error: the compiler is unable to type-check this expression. solution: explicitly declare the type of Modi { (modi: CGFloat) in ... } <img width="1282" alt="WX20200824-161248@2x" src="https://user-images.githubusercontent.com/16110563/91020893-9ec35000-e625-11ea-91ab-e9c65c0bfb3b.png">