IOS Note - Core NS Data Types
NSString (Immutable)
NSMutableString (rarely used)
NSNumber
NSValue
NSData (bits)
NSDate
NSArray (Immutable)
- once you create the array, you cannot add or remove objects
eg:
NSArray *primaryColors = [NSArray arayWithObjects:@"red", @"yellow", @"blue", nil];
NSMutableArray
NSDictionary
NSDictionary *base = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNUmber numberWithInt:2], @"binary",
[NSNUmber numberWIthInt:16], #hexadecimal", nil];
- (int)count;
- (id)objectForKey:(id)key;
- (NSArray *)allKeys;
- (NSArray *)allValues;
NSMutableDictionary
NSSet
NSMutableSet
NSOrderedSet
NSMutableOrderedSet
-----------------------------------------------------------------------------------------------------------
Enumeration
NSArray
NSArray *myArray = ...;
for (NSString *str in myArray) {
if ([str isKindOfClass:[NSString class]]) {
double value = [str doubleValue];
}
}
NSSet
NSSet *mySet = ...;
for (id obj in mySet) {
if ([obj isKindOfClass:[NSString class]]) {
// send NSString messages to obj
}
}
NSDictionary
NSDictionary *myDict = ...;
for (id key in myDict) {
id value = [myDict objectForKey:key];
}
IOS Note - Core NS Data Types的更多相关文章
- Core Java Volume I — 3.3. Data Types
3.3. Data TypesJava is a strongly typed language(强类型语音). This means that every variable must have a ...
- Data Types in the Kernel <LDD3 学习笔记>
Data Types in the Kernel Use of Standard C Types /* * datasize.c -- print the size of common data it ...
- Data Types
原地址: Home / Database / Oracle Database Online Documentation 11g Release 2 (11.2) / Database Administ ...
- 【12c】扩展数据类型(Extended Data Types)-- MAX_STRING_SIZE
[12c]扩展数据类型(Extended Data Types)-- MAX_STRING_SIZE 在12c中,与早期版本相比,诸如VARCHAR2, NAVARCHAR2以及 RAW这些数据类型的 ...
- Basic SAP Data Types
Basic SAP Data Types 6 out of 11 rated this helpful - Rate this topic The parameter types that the M ...
- Python - 2. Built-in Collection Data Types
From: http://interactivepython.org/courselib/static/pythonds/Introduction/GettingStartedwithData.htm ...
- Python - 1. Built-in Atomic Data Types
From:http://interactivepython.org/courselib/static/pythonds/Introduction/GettingStartedwithData.html ...
- FNDLOAD Commands to Download Different Seed Data Types. (DOC ID 274667.1)
In this Document Goal Solution References Applies to: Oracle Application Object Library - Version 11 ...
- Oracle Schema Objects——Tables——Oracle Data Types
Oracle Schema Objects Oracle Data Types 数据类型 Data Type Description NUMBER(P,S) Number value having a ...
随机推荐
- ORACLE之手动注册监听listener。alter system set local_listener="XXX"
记录下刚刚做的一个为一个数据库(t02)配置多个监听(listener)的实验,过程有点小曲折. (1)新增两个测试的监听,listener.ora的配置内容(可纯手动编辑该文件或使用netca)如下 ...
- 安装oracle XML Database 组件
近期部署项目数据库,编译包时遇到错误: PACKAGE CTG.CTG_CSB_COMMON 编译错误 错误:PLS-00201: identifier 'XMLDOM' must be dec ...
- [Everyday Mathematics]20150109
设 $A$ 是 $n$ 阶复方阵, 其特征多项式为 $$\bex f(\lm)=(\lm-\lm_1)^{n_1}\cdots(x-\lm_s)^{n_s}, \eex$$ 其中 $\lm_i$ 互不 ...
- nginx配置:location配置方法及实例详解
今天深入研究了下nginx的location的用法,已经一些需要注意的细节,现在做一个归纳总结,以备后面查询. location匹配的是nginx的哪个变量? $request_uri locatio ...
- python学习之subprocess模块
subprocess.Popen 这个模块主要就提供一个类Popen: class subprocess.Popen( args, bufsize=0, executable=None, stdin= ...
- bzoj 1090 [SCOI2003]字符串折叠(区间DP)
[题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=1090 [题意] 给定一个字符串,问将字符串折叠后的最小长度. [思路] 设f[i][j ...
- 【转】VC6.0附带小工具软件一览
)ActiveX Control Test Container称为"ActiveX 控件测试容器",顾名思义,此工具的主要功能就是测试ActiveX 控件,可以通过改变Active ...
- C#中的堆和栈
看到一篇讲堆和栈的文章,是我目前为止见到讲的最易懂,详细和深入的.我翻译成中文.以此总结. 原文=>C#Heap(ing) Vs Stack(ing) in .NET 在net framewor ...
- 在虚拟机VM中安装的Ubuntu上安装和配置Hadoop
一.系统环境: 我使用的Ubuntu版本是:ubuntu-12.04-desktop-i386.iso jdk版本:jdk1.7.0_67 hadoop版本:hadoop-2.5.0 二.下载jdk和 ...
- java的动态代理机制
前几天看到java的动态代理机制,不知道是啥玩意,然后看了看.死活不知道 invoke(Object proxy, Method m, Object[] args)种的proxy是个什么东西,放在这里 ...