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];
    }
  • 相关阅读:
    实例事件
    实例方法
    Extends Option 扩展选项
    Watch 选项 监控数据
    methods方法选项
    computed Option 计算选项
    propsData Option 全局扩展的数据传递
    component 父子组件
    component-04 动态绑定组件
    component 全局局部组件
  • 原文地址:https://www.cnblogs.com/davidgu/p/3480350.html
Copyright © 2011-2022 走看看