首先来总括的一下总体的架构和功能: swift
在大概的了解了总体的框架以后,咱们来说讲主要用到的类: 架构
界面布局及设计 框架
第一步:完成视图布局及界面设计 布局
第二步:建立频道类并测试是否可用 学习
ChannelController.swift 测试
继承:UIViewController 设计
UITableViewDataSource 继承
UITableViewDelegate 教程
实现方法: 接口
Func tabaleView(tableView:UITableView!,numberOfRowslnSection section:lin)-> lnt
//显示多少行
Func tableView(tableView:UITableView!,cellForRowAtlndexPath:NSlndexPath!)-> UITableViewCell! //选择每一行
Func tableView(tableView:UITableView!,didSelectRowAtIndexPath indexPath:NSIndexPath!) //选择行以后跳转到主页面
主界面类
第一步:主界面代码实现
界面关联:
继承:
UIViewController
UITableViewDataSource
UITableViewDelegate
实现方法:
Func tableView(tableView:UITableView!,numberOfRowsInSection section:Int)->Int //显示多行
Func tableView(tableView:UITableView!,cellForRowAtIndexPath indexPath:NSIndexPath!)->UITableViewCell! //选择每一行
获取远程数据
第一步:把界面元件与代码关联
主界面: 图片、进度条、时间、数据表格等
频道界面:数据表格等
第二步:建立获取数据类
HttpController 类
onSearch方法
HttpProtocol接口
Func didReRusults(resultData:NSDictionary)
将这些类什么的融合一些就能够把基本的音乐界面弄出来了,进一步的学习能够参考e良师益友网的IOS课程Swift实战训练百度在线音乐案例教程