zoukankan      html  css  js  c++  java
  • iCloud实现APP多设备数据同步

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(objChange:) name:NSUbiquitousKeyValueStoreDidChangeExternallyNotification object:nil];

     

    NSConcreteNotification 0x1c024ab60

    {

    name = NSUbiquitousKeyValueStoreDidChangeExternallyNotification;

    object = <NSUbiquitousKeyValueStore: 0x1c4281cc0>;

    userInfo = {

        NSUbiquitousKeyValueStoreChangeReasonKey = 0;

        NSUbiquitousKeyValueStoreChangedKeysKey =     (

            store

        );

    }}

    其中object就是NSUbiquitousKeyValueStore,可以从这里取值;

    - (void)objChange:(NSNotification *)note

    {

        NSString *store = [note.object objectForKey:@"store"];

        NSLog(@"store == %@",store);

        self.lb.text = store;

        

    }

    http://www.hudongdong.com/ios/385.html

  • 相关阅读:
    有趣的项目链接分享
    Nano Pi安装Opencv-python
    Opencv
    安装库的步骤
    EC20 AT指令
    最详细树莓派/NanoPi网线和电脑直接连接方法
    在Altium Designer中如何将一组器件合并为一个?
    Altium Designer如何快速查找PCB板上元件
    pip升级之后,不能使用
    利用opencv-python(cv2)查看设备连接摄像头的数量
  • 原文地址:https://www.cnblogs.com/dengchaojie/p/7993645.html
Copyright © 2011-2022 走看看