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 ...
随机推荐
- iOS开发:AFNetworking、MKNetworkKit和ASIHTTPRequest比较
转:http://www.xue5.com/Mobile/iOS/747036.html 之前一直在使用ASIHTTPRequest作为网络库,但是由于其停止更新,iOS7上可能出现更多的问题,于是决 ...
- Devexpress GridControl z
http://minmin86121.blog.163.com/blog/static/4968115720144194923578/ 1 AllowNullInput=False; --Devexp ...
- web自动化框架之一介绍与环境搭建(Selenium+Eclipse+Python)
看到一篇环境搭建文章,详细又全面,这里就不一一重复了 http://blog.csdn.net/dyllove98/article/details/9390649 其它: 1.框架介绍 整个 ...
- 进程通信之一 使用WM_COPYDATA C++及C#实现(转)
进程间通信最简单的方式就是发送WM_COPYDATA消息.本文提供C++及C#程序相互通信的二种实现方式.这样消息的接收端可以用C++实现,发送端可以用C++或C#实现. 发送WM_COPYD ...
- 如何在安裝SELinux的环境执行Quartus II
(原創) 如何在安裝SELinux的環境執行Quartus II? (SOC) (Quartus II) (Linux) (RedHat) Abstract一般人安裝Linux時,也會同時安裝SELi ...
- 关于C++ vector的拷贝
定义了vector变量,在使用时直接用了等号赋值,后来发现有问题,就查了一下vector怎么赋值? 说明:vector是一个构造对象,不能直接使用=符号进行复制,必须迭代每个元素来复制.或者重载=操作 ...
- Codevs No.1287 矩阵乘法
2016-06-01 16:53:23 题目链接: 矩阵乘法 (Codevs No.1287) 题目大意: 给你两个可乘矩阵a,b,求a*b 解法: 定义....... //矩阵乘法 (Codevs ...
- leetcode@ [343] Integer Break (Math & Dynamic Programming)
https://leetcode.com/problems/integer-break/ Given a positive integer n, break it into the sum of at ...
- 关于 终端 ls 命令 不能区分文件和目录的问题
默认的,使用ls命令来显示目录内容的时候,“终端”对于目录.可执行文件等特殊类型的文件并没有使用颜色来显示,只有使用“ls -G”时,才能显示颜色,这可真是不方便.有没有方法可以默认显示颜色呢?方法当 ...
- 十个提升你Emacs生产力的高招
转载 十个提升你Emacs生产力的高招 Emacs是世界上最好的编辑器(真的有很多人这么认为).不要以为emacs只是在编写程序时很牛X,其实只要你真正精通了emacs,会发现她几乎在所有用到打字 ...