为什么我的表格视图空白?在我添加"initWithStyle"之前没事
这是它的样子:

以下是我的代码:
这是我的.h:
#import <UIKit/UIKit.h>
@interface TableViewController : UITableViewController {
NSMutableArray *jokes;
IBOutlet UITableView *jokeTableView;
}
@property (nonatomic, retain) NSMutableArray *jokes;
@property (retain) UITableView *jokeTableView;
@end
Run Code Online (Sandbox Code Playgroud)
这是我的实现文件:
#import "TableViewController.h"
#import "Joke.h"
@implementation TableViewController
@synthesize jokes;
@synthesize jokeTableView;
- (void)awakeFromNib {
[jokeTableView init];
}
- (id)initWithStyle:(UITableViewStyle)style {
if (self = [super initWithStyle:style]) {
self.jokes = [NSMutableArray arrayWithObjects:
[Joke jokeWithValue:@"If you have five dollars and Chuck Norris has five dollars, Chuck Norris has more money than you"],
[Joke jokeWithValue:@"There is no …Run Code Online (Sandbox Code Playgroud)