Objective c 是否插入带有动画的UITableView?

Objective c 是否插入带有动画的UITableView?,objective-c,xcode,ios4,uiviewcontroller,uitableview,Objective C,Xcode,Ios4,Uiviewcontroller,Uitableview,我有一个视图,我想在其中显示UITableView并设置动画以添加行。在my.m中,我将其设置为UIViewController,并带有UITableView子类。我将我的数据源和委托与我的文件所有者链接起来 因为当尝试调用类似的东西时无法工作:[self.tableView reloadData],我创建了一个UITableView IBOutlet来执行此操作-tableView 尝试调用以添加以下对象时: NSArray *insertIndexPaths = [[NSArray allo

我有一个视图,我想在其中显示UITableView并设置动画以添加行。在my.m中,我将其设置为UIViewController,并带有UITableView子类。我将我的数据源和委托与我的文件所有者链接起来

因为当尝试调用类似的东西时无法工作:
[self.tableView reloadData]
,我创建了一个UITableView IBOutlet来执行此操作-
tableView

尝试调用以添加以下对象时:

NSArray *insertIndexPaths = [[NSArray alloc] initWithObjects:
                             [NSIndexPath indexPathForRow:0 inSection:0],
                             [NSIndexPath indexPathForRow:1 inSection:0],
                             [NSIndexPath indexPathForRow:2 inSection:0],
                             nil];
[theTableView beginUpdates];
[theTableView insertRowsAtIndexPaths:insertIndexPaths withRowAnimation:UITableViewRowAnimationFade];
[theTableView endUpdates];
它会启动,但调用viewDidLoad时不会发生任何事情。我无法将其设置为UITableViewController,因为其中有许多其他项

对不起,如果我的行话听起来有点不对劲的话——我在这方面很在行。感谢您的帮助


Coulton

我猜您与Interface Builder中的UITableView插座的连接已断开。

您如何将UITableView添加到视图中?我正在用NSMutableArray填充它。您正在合成属性并调用self.theTableView,对吗?