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 ...
随机推荐
- 【MySQL for Mac】在Mac终端导入&导出.sql文件
导入 打开终端输入:(前提是已经配置过MySQL环境变量) mysql -u root -p create database name; use name; source 『将.sql文件直接拖拽至终 ...
- 【周期串】NYOJ-1121 周期串
[题目链接:NYOJ-1121] 例如:abcabcabc 该字符串的长度为9,那么周期串的长度len只可能为{1,3,9},否则就不可能构成周期串. 接下来,就是要在各周期间进行比较.描述不清... ...
- OutputFormat中OutputCommitter解析
在hadoop中,由于一个Task可能由多个节点同时运行,当每个节点完成Task时,一个Task可能会出现多个结果,为了避免这种情况的出现,使用了OutPutCommitter.所以OutPutCom ...
- [持续更新]android stduio的一些小技巧
1.导入第三方jar 无法和eclipse一样可以直接刷新就可以导入libs里的jar,要到jar文件上右键按add jar. 2.其他依赖项目里有support-v4包的时候 在Libs里还是要有s ...
- mvc JavaScriptResult的用法
一.JavaScriptResult在MVC中的定义的代码片段 C# 代码 复制 public class JavaScriptResult : ActionResult { public o ...
- 去除下载电影和电视剧文件名中的多余字符[python实现]
讨厌下载电影和电视剧文件名中的多余字符(如网址和广告字样),,搞得文件名好长,可以使用下面的Python代码,自行修改即可. #!\usr\bin\env python # -*- coding: u ...
- css样式表中的样式覆盖顺序
刚才写zenktodo的时候,通过动态添加class的方式修改一个div的样式,总是不起作用. #navigator { height: 100%; width: 200; position: abs ...
- CreateThread函数&&CString::GetBuffer函数
对这个两个常见的windows下的函数学习了一下: //最简单的创建多线程实例 #include <stdio.h> #include <windows.h> //子线程函数 ...
- Hadoop 2.6.0 POM.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...
- 无线 WIFI 的13个信道频率范围
目前主流的无线WIFI网络设备不管是802.11b/g还是802.11b/g/n 一般都支持13个信道.它们的中心频率虽然不同,但是因为都占据一定的频率范围,所以会有一些相互重叠的情况.下面是13个信 ...