iOS 代码如何创建静态tableView

iOS 码拜 9年前 (2015-05-03) 1054次浏览 0个评论

求:iOS 代码如何创建静态tableView  谢谢~~

iOS 代码如何创建静态tableView
5分
不知道我理解的静态 tableView 跟你理解的一不一样

你只要自定义数据,在
   -(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
这个方法里实现就可以了。

如果不是的话,你可以把你的问题再讲详细点

iOS 代码如何创建静态tableView
5分
其实都一样的
iOS 代码如何创建静态tableView
5分
代码创建不了,这是Storyboard的功能
iOS 代码如何创建静态tableView
10分
所谓的静态就是指不通过代码的方式来创建,主要是通过storyboard可视化配置。
iOS 代码如何创建静态tableView
5分

什么叫静态tableview?。。。。。。

    m_tableMedia = [[UITableView alloc] initWithFrame:self.view.frame];
    [self.view addSubview:m_tableMedia];
    m_tableMedia.delegate = self;
    m_tableMedia.dataSource = self;

代码所在类实现UITableViewDelegate,UITableViewDataSource。

 -(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
这个方法里实现数据的加载

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
这个方法里面返回数据的条目总数。


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明iOS 代码如何创建静态tableView
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!