zoukankan      html  css  js  c++  java
  • IOS Note

    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];
    }
  • 相关阅读:
    socket的双重属性
    Client/Server 模型 与socket
    简单理解Socket 重要
    C++ 异常处理机制的实现
    ARM汇编之MOV指令
    指令集 与 cpu
    寄存器简介 与 ebp esp
    ESP和EBP 栈顶指针和栈底指针
    函数调用过程栈帧变化详解
    栈帧
  • 原文地址:https://www.cnblogs.com/davidgu/p/3480350.html
Copyright © 2011-2022 走看看