开发者

Monotouch UITableView delete row

Hey - I have the following method on my UITableView controller

public void RemoveEventFromList(Event evt){

            if (_sessions != null) {

                if (_sessions.Contains(evt)) {

                    _sessions.Remove(evt);

                }
            }

            this.tableView.ReloadData();
        }

which doesn't do anything!! - how do开发者_如何学Python i manually remove the item from the list? this method is called from the next view in the nav tree (the details view) - so there is no selected row or anything like that.

this is the only thing holding me back from submitting the free version of my app to the appstore! so aaaaaaaany help really appreciated!

:)

w://


You need to update the data on the tableView before reloading. This usually involves reinitializing the DataSource property with, in your case, the updated _sessions collection. Try that out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜