Yalantis/PullToMakeSoup

swift 2.0 Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions

alexliubj opened this issue · 4 comments

Pulltomakesoup.swift file and location has this error:

let progressWithOffset: (Double, Double) -> Double = { offset, progress in
return progress < offset ? 0 : Double((progress - offset) * 1 / (1 - offset))

Resolving this with replacing it by a function

func progressWithOffset(offset:Double, progress: Double) -> Double
{
return progress < offset ? 0 : Double((progress - offset) * 1 / (1 - offset))
}

Thanks for the fix.

seems like hasn't applied yet. the solution above has a little problem.the second parameter should be omitted.just add '_'

func progressWithOffset(offset:Double, _ progress: Double) -> Double
{
return progress < offset ? 0 : Double((progress - offset) * 1 / (1 - offset))
}

Thanks, @alexliubj and @jiaowochunge . Now fix in the master. Pod also updated