Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [0 nan; 280 524]'

后端 未结 2 1090
说谎
说谎 2021-01-17 11:33

I am developing a book app where users can change the font size on the TextView.

when users change the font size, the app save the current text position not to chang

2条回答
  •  死守一世寂寞
    2021-01-17 11:40

    In my case, code was doing 0.0 / 0.0 resulting -nan (infinity) and used further for converting to double.

    I added a guard condition to make sure values are > 0.0

提交回复
热议问题