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之《set》
    python之 《zip,lambda, map》
    python之 socketserver模块的使用
    iOS FMDB小试了一下
    人生要自强不息-路遇瞎子感悟
    iOS Node Conflict svn冲突
    iOS 隐藏Status Bar
    iOS NSURLSession 封装下载类
    iOS NSFileManager
    iOS prototype Cells
  • 原文地址:https://www.cnblogs.com/dengchaojie/p/7993645.html
Copyright © 2011-2022 走看看