I'm using these Compilation Swift Flag to identify codes that slow down the compilation time:
-Xfrontend -warn-long-function-bodies=100
-Xfrontend -warn-long-expression-type-checking=100
Then after building, I get warnings
like these:
Instance method 'startFadePositionTitle()' took 2702ms to type-check (limit: 500ms)
for this part of the code:
func startFadePositionTitle() -> CGFloat {
let value: CGFloat = ((backgroundImage.frame.height/2 - contentTitle.frame.height/2) - navbarView.frame.height)/2
return value
}
Can someone explains me what is wrong in this method and what could I possibly improve?