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

  • 相关阅读:
    python模块之random模块
    python模块之os模块
    python模块之collections模块
    python模块之re模块
    python基础十五之递归函数
    python基础十四之匿名函数
    python基础十三之内置函数
    leetcode 108 和leetcode 109 II
    leetcode 108 和leetcode 109
    对于final修饰的类型运算时的表现
  • 原文地址:https://www.cnblogs.com/dengchaojie/p/7993645.html
Copyright © 2011-2022 走看看