0

我在 Xcode 中看到警告错误为“从枚举类型 'enum NSUITableViewRowAnimation' 到不同枚举类型 'UITableViewScrollPosition' 的隐式转换”

这是我收到错误的代码:

  [detailTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewRowAnimationTop animated:YES];
4

1 回答 1

2

错误说明了一切。您没有使用正确的枚举类型。

你应该使用UITableViewScrollPositionTop.

参考:表格视图滚动位置

于 2013-02-06T19:23:36.727 回答