Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swift3 使用网络图片地址报错 #31

Open
LEEay opened this issue Apr 26, 2017 · 5 comments
Open

swift3 使用网络图片地址报错 #31

LEEay opened this issue Apr 26, 2017 · 5 comments

Comments

@LEEay
Copy link

LEEay commented Apr 26, 2017

[__NSArrayM insertObject:atIndex:]: object cannot be nil'

@codingZero
Copy link
Owner

这个报错是因为你往数组里面插入了一个nil

@LEEay
Copy link
Author

LEEay commented Apr 26, 2017

我传入的是字符串 carouselView.imageArray = ["http://admin.shundasaige.com/cnt/img_origan/333/1525ef82-f823-4e89-a2f3-e45a6fd1911e.jpg", "http://admin.shundasaige.com/cnt/img_origan/333/1525ef82-f823-4e89-a2f3-e45a6fd1911e.jpg"]
swift3

@codingZero
Copy link
Owner

在上面那句代码之前加上这句 carouselView.placeholderImage = UIImage() 就OK了

@LEEay
Copy link
Author

LEEay commented Apr 26, 2017

能问下为什么是这个呢?

@LEEay
Copy link
Author

LEEay commented Apr 26, 2017

我这样是通过api获取的数据重新给控件数据,但是现在的问题成了,控件会增加上这次的图片,不是重新覆盖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants