• NSKeyedArchiver : NSCoder


    NSKeyedArchiver : NSCoder

    @interface NSData : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>

    @protocol NSCoding

    - (void)encodeWithCoder:(NSCoder *)aCoder;

    - (nullable instancetype)initWithCoder:(NSCoder *)aDecoder; // NS_DESIGNATED_INITIALIZER

    @end

    @implementation objectX

    - (void)encodeWithCoder:(NSCoder *)aCoder

    {

        

    }

    @end

    objectX *ojx = [objectX new];

    [NSKeyedArchiver archivedDataWithRootObject:ojx];

    * thread #1: tid = 0x125a24, 0x000000010725ac3f nscodingX`-[objectX encodeWithCoder:](self=0x00007fe1abe53540, _cmd="encodeWithCoder:", aCoder=0x00007fe1abe46410) + 47 at objectX.m:16, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1

      * frame #0: 0x000000010725ac3f nscodingX`-[objectX encodeWithCoder:](self=0x00007fe1abe53540, _cmd="encodeWithCoder:", aCoder=0x00007fe1abe46410) + 47 at objectX.m:16

        frame #1: 0x0000000107354d57 Foundation`_encodeObject + 1259

        frame #2: 0x000000010735452e Foundation`+[NSKeyedArchiver archivedDataWithRootObject:] + 162

        frame #3: 0x000000010725a89d nscodingX`-[ViewController viewDidLoad](self=0x00007fe1abe539b0, _cmd="viewDidLoad") + 125 at ViewController.m:24

  • 相关阅读:
    socket
    netstat
    列表
    突然发现不会写代码了
    算法资源
    bit位操作
    排序算法
    连续子数组最大和
    books
    凸优化
  • 原文地址:https://www.cnblogs.com/feng9exe/p/7060257.html
Copyright © 2020-2023  润新知