unrecognized selector sent to instance 0x8c9a6d0

后端 未结 4 1033
你的背包
你的背包 2020-12-20 15:20

Can anyone tell me what is going on in this error code

[UIViewController collectionView:numberOfItemsInSection:]: unrecognized selector sent to instance 0x8c         


        
4条回答
  •  眼角桃花
    2020-12-20 16:24

    well, seems you don't set the right instance as datasource.

    the runtime is trying to call the method on a UIViewController. That is wrong as that cannot be the right class.

    my guess is that you haven't set your view controller's class in the xib and therefore a default UIViewController is used

提交回复
热议问题