Error: unrecognized selector sent to instance

前端 未结 2 604
清酒与你
清酒与你 2021-01-24 00:47

I have a custom object, Spaces:

#import \"Spaces.h\"


@implementation Spaces

@synthesize spaceName;
@synthesize spaceUsers;
@synthesize spaceIcon;         


        
2条回答
  •  余生分开走
    2021-01-24 01:18

    Perhaps your aSpace = [spaces objectAtIndex:[indexPath row]]; is not returning a Space object. Perhaps before you try and use it you test to make sure with something like if ([aSpace class] == [Spaces class])

提交回复
热议问题