开发者社区> 狗尾巴呢> 正文

iOS开发笔记 3、iOS基础

简介: 系统规格 iPhone的规格 Each is a 4.7- or 4.8-ounce computing device. Each contains a 620 MHz ARM CPU that has been underclocked to improve battery performance and reduce heat.
+关注继续查看

系统规格

iPhone的规格

Each is a 4.7- or 4.8-ounce computing device. Each contains a 620 MHz ARM CPU that has been underclocked to improve battery performance and reduce heat. The iPhone and iPhone 3G each include 128 MB of dynamic RAM (DRAM) and from 4 to 16 GB of Flash memory. The 3GS received an upgrade to 256 MB of RAM as well as a graphics chip enabling it to run OpenGL ES 2.0.

iPad的规格

The iPad weighs in at 1.5 pounds for the wi-fi model and 1.6 pounds for the wi-fi+3G model. Its 9.7-inch LED screen supports a resolution of 1024 x 768 at 132 pixels per inch. The iPad comes in 16 GB, 32 GB, and 64 GB models, all equipped with a 1 GHz A4 custom designed CPU.

image

image

image

image

知道了这些规格和操作,对软件的布局和操作设计很有用处

iOS的结构

image

Most of your programming work will be done using the UIKit (UI) or Foundation (NS) frameworks. These libraries are collectively called Cocoa Touch; they’re built on Apple’s modern Cocoa framework, which is almost entirely object-oriented and, in our opinion, much easier to use than older libraries. The vast majority of code in this book will be built solely using Cocoa Touch.

Cocoa Touch It contains the UIKit framework—which is what we spend most of our time on in this book—and the address book UI framework. UIKit includes window support, event support, and userinterface management, and it lets you create both text and web pages. It further acts as your interface to the accelerometers, the camera, the photo library, and devicespecific information.

Media is where you can get access to the major audio and video protocols built into the iPhone and iPad. Its four graphical technologies are OpenGL ES, EAGL (which connects OpenGL to your native window objects), Quartz (which is Apple’s vectorbased drawing engine), and Core Animation (which is also built on Quartz). Other frameworks of note include Core Audio, Open Audio Library, and Media Player.

Core Services offers the frameworks used in all applications. Many of them are data related, such as the internal Address Book framework. Core Services also contains the critical Foundation framework, which includes the core definitions of Apple’s objectoriented data types, such as its arrays and sets.

Core OS includes the kernel-level software. You can access threading, files, networking, other I/O, and memory.

iOS中的类

UIKit framework classe

UI开头的类,如UIView等classes most tightly connected to the devices, including all the graphical classes

Foundation framework classes

NS开头,主要基本数据结构的支持,如数组,字符串,Url, XML解析等

其他

Address Book framework

Address Book UI framework

 

Core Audio framework

Media Player framework

Core Graphics framework

Quartz Core framework

OpenGL ES framework

APNS framework:Push notification services

Map Kit framework: This framework provides you with a simple view that you can add anywhere you want a map to appear.

Store Kit framework: The Store Kit API allows you to sell various items within your application.

Core Foundation framework

Core Location framework

NS CLASS

The NS classes come from Core Services’Foundation framework (the Cocoa equivalent of the Core Foundation framework), which contains a huge number offundamental data types and other objects.

根对象NSObject

THE UI CLASSES

The second broad category contains the UI classes. These come from Cocoa Touch’s UIKit framework, which includes all the graphical objects you’ll be using as well as all the functionality for the iPhone OS’s event model, much of which appears in UIResponder.

Window , View, view controllers

A window is something that spans the device’s entire screen. An application has only one, and it’s the overall container for everything your application does.

A view is the content holder in your application. You may have several of them, each covering different parts of the window or doing different things at different times. They’re all derived from the UIView class. But don’t think of a view as a blank container. Almost any object you use from the UIKit will be a subclass of UIView that features a lot of behavior of its own. Among the major subclasses of UIView are UIControl, which gives you buttons, sliders, and other items with which users may manipulate your program, and UIScrollableView, which gives users access to more text than can appear at once.

A view controller does what its name suggests. It acts as the controller element of the Model-View-Controller triad and in the process manages a view, sometimes called an application view. As such, it takes care of events and updating for your view.

对象创建

idnewObject = [[objectClassalloc] init];

常见的子类重写init方法

- (id)init

{

if (self = [super init]) {

// Instance variables go here

}

return self;

}

带参数的初始化方法

[[UITextViewalloc] initWithFrame:textFieldFrame];

一个特殊的方法:Interface Builder中使用

initWithCoder:

工厂方法:

[UIButtonbuttonWithType:UIButtonTypeRoundedRect];

 

  image

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
iOS开发笔记 8、真机调试和发布软件
首先根据需要缴纳$99/299的费用加入成员计划。 按照如下的不同角色和操作界面即可完成代码的调试和发布   概括起来: 申请人Team Agent角色加开发管理员和申请软件的发布 Team Admin开发管理员可以自己调试和加人   过程涉及:证书,apple ID,机器ID等系列的...
762 0
iOS Quartz 2D相关笔记总结笔记 韩俊强的博客
一、基本理论和基本代码 概念总结 Quartz 2D是一个二维绘图引擎,同时支持iOS和Mac系统。Quartz 2D能完成的工作:绘制图形 : 线条,三角形,矩形,圆,弧等;绘制文字绘制,生成图片(图像)读取,生成PDF截图,裁剪图片自定义UI控件等Quartz2D提供了以下几种类型的Gra...
758 0
移动弹窗基础知识浅析——IOS弹窗体系
最为常见的【弹窗】反而是最“捉摸不定”的东西。各种类型的弹窗傻傻分不清楚,不知道在什么场景下应该用哪种弹窗。尤其是遇到“二次确认”等场景…… 因此,打算从头整理移动弹窗的基础知识,以iOS弹窗体系为切入点,从定义出发,对移动弹窗进行分类,然后分别分析每一类弹窗的应用场景,以及在使用过程中需要注意的点。
2846 0
iOS开发笔记 7、数据【Preferences、文件、库、Core Data】
程序开发中根据要使用各种各样的数据,如配制、文件系统、数据库等,iOS对这个有很好的支持 Preferences If you’re going to create a program that has built-in preferences, you should do so using the Utility Application template.
866 0
iOS开发那些事-iOS6苹果地图实用开发
<p>在iOS 6之后,不再使用谷歌地图了,而是使用苹果自己的地图,但是API编程接口没有太大的变化。开发人员不需要再学习很多新东西就能开发地图应用,这是负责任的做法。因此本节介绍的内容也同样适用于iOS5上运行地图应用开发。</p> <p><span id="more-206"></span></p> <p>iOS应用程序中使用Map Kit API开发地图应用程序。 其核心是MKMapVi
1213 0
HaaS UI基础教学十:IoT平台连接
阿里云智能物联网平台为设备提供安全可靠的连接通信能力,向下连接海量设备,支撑设备数据采集上云;向上提供云端API,服务端通过调用云端API将指令下发至设备端,实现远程控制。
280 0
+关注
狗尾巴呢
从事研发20年 涉及桌面软件、嵌入式设备、C/S分层系统、B/S业务系统、互联网系统等等各类系统 语言涉及C/C++ .net系统 java系列 前端系列等等不同的类别 主控和主导了国家863项目,企业业务应用系统,自然语言翻译系统,数据库审计等系列的软件研发
437
文章
2
问答
文章排行榜
最热
最新
相关电子书
更多
JS零基础入门教程(上册)
立即下载
性能优化方法论
立即下载
手把手学习日志服务SLS,云启实验室实战指南
立即下载