Weird UITableViewCell Loading Exception

前端 未结 3 707
鱼传尺愫
鱼传尺愫 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 <UIKit/UIKit.h>
    @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
    
    0 讨论(0)
  • 2021-02-04 06:32

    I had the same thing. Installed 3.2 beta from 3.1.2 and had this error.

    In the end this fixed it: Rebuild against Simulator 3.1 and I got a working build in the simulator. After this, builds against Simulator 3.1.2 work.

    0 讨论(0)
  • 2021-02-04 06:41

    Uh oh. I'm having the same issue... Also using today's new SDK (01/28/2010). Can't say for sure whether the code was working before, because I just added it AFTER updating to the new SDK.

    Anybody else seeing this issue now? Any solutions?

    Update: I just switched the simulator to SDK 3.2 (from 3.12), and whattaya know... it's working now (in the iPhone and iPad simulator). However, it doesn't work when compiling using SDK 3.12.

    My guess is that IB is saving the XIB in a new format for 3.2 perhaps? Anybody know how to force it to save in the old (3.12) format? This definitely feels like a bug, as it's breaking previously working code.

    0 讨论(0)
提交回复
热议问题