「爱限免」是为广大 iPhone 手机用户精心制作的一款免费应用。第一时间为您提供限时免费以及降价打折应用,我们所做的一切就是帮您省钱,不花钱就能够及时使用最新、最酷iPhone应用。
/**************************************************************
一、常见软件的开发流程
1.需求分析
2.概要设计(确定有哪些模块,模块功能,架构)
3.详细设计(模块的功能点,界面设计)
4.编码实现
5.调试测试
6.上线部署
7.维护阶段
二、移动应用开发简单流程
1.设计阶段(产品经理确定产品的功能、界面,美工画图,完成整个设计)
2.实现阶段(实现功能——测试功能——版本适配——真机调试)
3.上线阶段(上传AppStore审核,修改直至通过,正式上线)
**************************************************************/
/***********************************
①应用名称:爱限免
②软件介绍:
“爱限免”是为广大iPhone手机用户精心制作的一款免费应用。
第一时间为您提供限时免费以及降价打折应用,我们所做的一切就是帮您省钱,
不花钱就能够及时使用最新、最酷iPhone应用。
③主要功能:
1.限免、降价信息推送提醒,方便您在有效期内快速下载,以免错过免费期。
2.遇有收费APP,您又想免费安装正版,可以点击收藏,一旦免费或降价,即刻通知您下载。
3.个性化应用分类设定,方便您更快找到自己想要的APP应用。
4.可以对海量的APP应用打分,发表评论,您也可以很方便得跟亲朋好友分享。
5.我们费时四年研发的搜索系统,可以让您即使不能准确记住APP名称的情况下,立刻精确得查找到。
更多功能,您可以下载体验。使用“爱限免”应用,绝对帮您省时省钱!
************************************/
//程序框架
</code>
</pre>
<h4>1.整体框架</h4>
<pre>
<code class="language-objectivec line-numbers">//实现过程
//分析
UITabBarController --> MyTabBar
UINavigationController + Limit(AppList)
UINavigationController + Sale(AppList)
UINavigationController + Free(AppList)
UINavigationController + Topic(Root)
UINavigationController + Hot(AppList)
//创建RootViewController作为其他界面的父界面
//图片资源
//导航条
//背景: navigationbar.png
//左导航按钮: buttonbar_action.png
//右导航按钮: buttonbar_action.png
//标签栏
@"tabbar_limitfree.png",
@"tabbar_reduceprice.png",
@"tabbar_appfree.png",
@"tabbar_subject.png",
@"tabbar_rank.png"</code>
</pre>
<h4>2.实现limit页面,显示应用列表Applist</h4>
<pre>
<code class="language-objectivec line-numbers">//练习:
//(1)定制cell
//(2)实现下拉刷新和上拉加载更多操作
//网络接口:
//限免页面接口
//http://iappfree.candou.com:8080/free/applications/limited?currency=rmb&page=1&category_id=6001×tamp=20140410085308&sign=XXXXXXXXXXXXXXXX
#define LIMIT_URL @"http://iappfree.candou.com:8080/free/applications/limited?currency=rmb&page=%d&category_id=%@"
// 小技巧
// 把汉字转化成url encoded可以在网上传输的...
NSString *str = [searchBar.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
//实现搜索界面
//第一步: 先添加搜索条, 输入和取消效果切换
//第二步: 处理搜索</code>
</pre>
<h4>3.实现详情页面</h4>
<pre>
<code class="language-objectivec line-numbers">//网络接口:
//详情页面接口
// http://iappfree.candou.com:8080/free/applications/688743207?currency=rmb
#define DETAIL_URL @"http://iappfree.candou.com:8080/free/applications/%d?currency=rmb"
//界面布局:
//顶部视图: 10, 3, 300, 280 appdetail_background.png
//图标 10, 10, 70, 70
//名称 90, 8, 300-100, 30
//按钮1: 0, 90, 100, 40 Detail_btn_left.png
//按钮2: 100, 90, 100, 40 Detail_btn_middle.png
//按钮3: 200, 90, 100, 40 Detail_btn_right.png
//滚动视图 10, 135, 280, 88
//底部视图 10, 282 , 300, 90 appdetail_recommend.png</code>
</pre>
<h4>4.实现专题页面和分类页面</h4>
<pre>
<code class="language-objectivec line-numbers">/*
界面描述
TopicCell cell大小 310X308
背景 topic_Cell_Bg.png
_titleLabel 10, 15, 320, 30 font=18
_imgView 10, 50, 122, 186
appShowViewArray 4个
double w=160;
double h=50;
double x=140;
y = 50 + i*h;
_imgDescView 10, 260, 40, 40
_descLabel 60, 260, 240, 40 font=12
AppShowView 大小: 160X50
_iconImageView 3, 3, 44, 44
_titleLabel 50, 0, 200, 20
commentView 50, 18, 13, 9 topic_Comment.png
_commentLabel 50+13, 15, 100, 20 font=12
downloadView 100, 18, 10, 11 topic_Download.png
_downLabel 100+13, 15, 100, 20 font=12
_starView 50, 30, 80, 10
分类
CategoryCell 0,0,320,80 cate_list_bg.png
_iconImageView 15, 7, 60, 60
_categoryNameLabel 80, 10, 100, 30
_categoryDetailLabel 80, 40, 300, 30
分类图片名:
如果分类名为 Game, 则图片为 category_Game.jpg
*/</code>
</pre>
<h4>5.配置界面,缓存,数据存储</h4>
<pre>
<code class="language-objectivec line-numbers">/*
什么是缓存, 缓存的功能
数据下载之后把数据保存起来, 下次下载的时候先检查数据在缓存是否存储,
如果存在, 则直接读取, 如果不存在, 再从网络下载。
已经下载过的数据不需要重复下载, 提高页面的加载速度, 节省网络流量。
如何实现:
1. 数据下载之后把数据保存起来
2. 下次下载的时候从缓存中读取数据
*/
//背景色
self.view.backgroundColor = [UIColor colorWithRed:226.0/255.0 green:226.0/255.0 blue:226.0/255.0 alpha:1];
//配置界面图片
@"setting",@"favorite",@"user",
@"collect",@"download",@"comment",
@"help",@"candou",@""
//配置界面按钮标题
@"我的设置",@"我的关注",@"我的账户",
@"我的收藏",@"我的下载",@"我的评论",
@"我的帮助",@"蚕豆应用",@""
w=57, h=57, interval=35, left=35,top=40
//数据库创建命令
@"create table if not exists applist ("
" id integer primary key autoincrement not null, "
" recordType varchar(32), "
" applicationId integer not null, "
" name varchar(128), "
" iconUrl varchar(1024), "
" type varchar(32) ,"
" lastPrice integer, "
" currentPrice integer "
");";</code>
</pre>
<h4>6.分享, HUD(提示框), 启动界面, 适配(版本,屏幕), 打开appstore, 地图定位, 调试…</h4>
<pre>
<code class="language-objectivec line-numbers">/*
1. 实现分享功能
实现分享-两种
<1>使用网站提供的分享SDK--新浪微博提供一套SDK
<2>使用开源库
ShareSDK 实现分享, 庞大, 功能强大
QFShareSDK
友盟分享 简单好用(第三方类库)
2. 实现下载提示
<1> 自己实现
<2> 使用开源库
cocoachina--论坛, 代码库
3. 启动界面
Default.png 应用加载的时候默认图片
如果加载较快, 看不到
怎么该应用图标
设置icon.png
如何修改应用显示名称
修改plist中Bundle display name
自己添加启动界面(淡出效果)
去掉performSelector警告
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"'
*/