Weird UITableViewCell Loading Exception

前端 未结 3 743
鱼传尺愫
鱼传尺愫 2021-02-04 05:49

In my app, I use a custom NIB to load my UITableViewCells. The NIB\'s File\'s Owner is set so the class is my View Controller. I then Link the UITableViewCell to the IBOutlet I

3条回答
  •  忘了有多久
    2021-02-04 06:30

    Found solution in dev forums

    Create this files:

    UITableViewCellContentView.h

    #import 
    @interface UITableViewCellContentView : UIView {
    }
    @end
    

    UITableViewCellContentView.m

    #include "UITableViewCellContentView.h"
    @implementation UITableViewCellContentView
    
    + (id)alloc {
        return [UIView alloc];
    }
    
    + (id)allocWithZone:(NSZone *)zone {
        return [UIView allocWithZone:zone];
    }
    
    @end
    

提交回复
热议问题