UITableViewDataSource, UITableViewDelegate

来源:互联网 发布:野风 林忆莲 知乎 编辑:程序博客网 时间:2024/05/16 15:23

#pragma mark -- UITableViewDataSource- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{    return 1;}- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{    return 1;}- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{    return nil;}#pragma mark -- UITableViewDelegate- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{    return 44;}- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{    }

swift

    func numberOfSectionsInTableView(tableView: UITableView) -> Int    {        return 1    }        func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {            }        func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {            }        func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {            }        func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {            }


0 0
原创粉丝点击