[UIPageControl] Page out-of-boun

2020-07-17  本文已影响0人  iOS_我更专业

[UIPageControl] Page out-of-bounds. Requested 0 but the page control only has 0 pages.

iOS更新到iOS14之后,Run项目会崩溃,原因是我封装的UIPageControl崩溃,但是在iOS13及以下,并未出现这种情况,最后发现是因为在没有赋值Count前,先赋值了number造成的崩溃。我用的是Swift4.0,但是又用OC重写之后就不会崩溃了,也不知道什么原因,如果有大神知道原因请留言告诉我~

上一篇 下一篇

猜你喜欢

热点阅读