Update UIProgressView in UICollectionViewCell for download file

后端 未结 2 1818
执念已碎
执念已碎 2021-01-20 15:44

I\'m trying to update the UIProgressView in UICollectionViewCell when I download a file, but sometime the progressView update and sometime doesn\'t update, and I can\'t unde

2条回答
  •  礼貌的吻别
    2021-01-20 16:00

    Create your customCell and display all Visible UIViews in it(init , add subview...). Than use custom method in cellForItemAtIndexPath to active(display) it. If you think about MVC, cellForItemAtIndexPath just for Controller, not View.

    In your case, bring all IBAction, loadLink and updateProgress to customCell and send parameter to active them, or you can create new protocol like CustomCellDelegate to communicate.

    Check for more information:

    Error setting text in collection view cell

提交回复
热议问题