没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Learn iOS programming. If you know other programming languages such as Python or Java and want the start developing for iOS devices, this is the book for you. You will build 3 apps which will teach you how to get started with programming with cocoa touch framework and the swift programming languages.
资源推荐
资源详情
资源评论
Table of Contents
1 Body Mass Index Calculator
2 Shopping List
3 Driving Route and Distance
Body Mass Index Calculator
1
In this chapter we will build a body mass index calculator app. The user will enter a per-
son’s height and weight and the app will calculate their body mass index. The app will
have two text fields to enter data, a button to calculate the result, and a label to show the
calculated result. The app will look like the following when we are finished.
1
Open Xcode and create a new project.
Select “Single View App” template under iOS project and click Next.
2
Type “Body Mass Index Calculator” for product name. Organization name and identifier
could be anything you want for this tutorial. Keep the language Swift.
Click next, choose a place to save your project and click create.
Once you have created your project open Main.storyboard. From the object library (that’s
on the lower right side) drag two text fields to the storyboard scene. One will be for the
height and the second one will be for the weight.
3
Both height and weight will be numbers not characters so we need to change the key-
board type for each text field that will be used to enter values. Select the first text field, go
to the Attributes Inspector (top right in Xcode) and change Keyboard Type to Number Pad.
Do the same for the second text field.
4
剩余49页未读,继续阅读
资源评论
tlforest
- 粉丝: 27
- 资源: 198
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 联想7400打印机更换定影组件.jpg
- 基于servlet+jsp+mysql实现的影视管理系统课程设计
- GUIdemo.zip
- 正点原子RK3568卡片电脑ATOMPI-CA1的ubuntu-24.04.1最小安装包,特别适合运行板级ROS2环境jazzy
- U盘量产工具SM3280&3281&3282-AvidiaV0209整合版
- 可直接运行 MATLAB数学建模学习资料 模拟算法MATLAB代码实现.rar
- 计算机数学建模中模拟退火算法详解及其TSP问题求解应用
- 基于 Java+SQLServer 实现的医药售卖系统课程设计
- HCNP(HCDP)华为认证资深网络工程师-路由交换方向培训 -IESN中文理论书-内文.pdf
- 新版FPGA课程大纲,芯片硬件开发用的大纲
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功