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

  • 相关阅读:
    Windows下路由表分析
    VMware Workstation网络连接的三种模式
    VMware Workstation环境下的三种网络配置桥接,NAT和HOST-ONLY
    Binary Tree Right Side View
    Count Complete Tree Nodes
    Flatten Binary Tree to Linked List
    Valid Anagram
    SELINUX部分的权限规则问题鸟哥7.4&&7.5?????
    网络五层架构及各层使用的协议
    Linux的echo -n -e 两个参数的含义
  • 原文地址:https://www.cnblogs.com/dengchaojie/p/7993645.html
Copyright © 2011-2022 走看看