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

  • 相关阅读:
    剑指offer
    NET 的 ELK 监控方案
    SSM 框架整合
    搭建ELK 6
    NETCOREAPI 跨域处理
    修改数据库端口为51433
    修改ftp端口为50021
    文件每日备份批处理
    修改3389为53389
    批处理实现自动删除过期文件的定期操作
  • 原文地址:https://www.cnblogs.com/dengchaojie/p/7993645.html
Copyright © 2011-2022 走看看