ThreadedCoreData
===========================================================================
DESCRIPTION:
This sample shows how to use Core Data in a multi-threaded environment.
Based on the SeismicXML sample, it downloads and parses an RSS feed from the United States Geological Survey (USGS) that provides data on recent earthquakes around the world.
What makes this sample different is that it persistently stores earthquakes using Core Data.
Each time you launch the app, it downloads new earthquake data, parses it in an NSOperation which checks for duplicates and stores newly founded earthquakes as managed objects.
This sample follows the first recommended pattern mentioned in the Core Data Programming Guide: Multi-Threading with Core Data; General Guidelines section - "Create a separate managed object context for each thread and share a single persistent store coordinator."
For those new to Core Data, it can be helpful to compare SeismicXML sample with this sample and notice the necessary ingredients to introduce Core Data in your application.
===========================================================================
BUILD REQUIREMENTS
iOS SDK 4.2 or later
===========================================================================
RUNTIME REQUIREMENTS
iOS OS 3.2 or later
===========================================================================
PACKAGING LIST
SeismicXMLAppDelegate
Delegate for the application, initiates the download of the XML data and parses the Earthquake objects at launch time.
Earthquake
The model class (NSManagedObject) that stores the information about an earthquake.
RootViewController
A UITableViewController subclass that manages the table view.
ParseOperation
The NSOperation class used to perform the XML parsing of earthquake data, creating managed objects based on each earthquake and stores them on the main thread.
===========================================================================
CHANGES FROM PREVIOUS VERSIONS
Version 1.0
- New Release
===========================================================================
Copyright (C) 2011 Apple Inc. All rights reserved.
没有合适的资源?快使用搜索试试~ 我知道了~
iPhone 多线程 CoreData使用源代码
共30个文件
png:11个
m:5个
h:4个
5星 · 超过95%的资源 需积分: 9 120 下载量 106 浏览量
2011-10-12
15:06:31
上传
评论 3
收藏 80KB ZIP 举报
温馨提示
iPhone 多线程 CoreData使用 源代码 如何创建多线程,以及如何在多线程中使用CoreData
资源推荐
资源详情
资源评论
收起资源包目录
ThreadedCoreData.zip (30个子文件)
ThreadedCoreData
main.m 3KB
Prefix.pch 123B
images
Icon-Small@2x.png 1010B
Default.png 9KB
iTunesArtwork 5KB
Icon.png 1007B
3.0.png 5KB
Icon-Small.png 918B
2.0.png 5KB
Icon@2x.png 1KB
Icon-Small-50.png 992B
5.0.png 5KB
Icon-72.png 1KB
4.0.png 5KB
ThreadedCoreData.xcodeproj
project.pbxproj 18KB
Info.plist 1KB
en.lproj
RootView.xib 7KB
Localizable.strings 922B
MainWindow.xib 11KB
Classes
Earthquakes.xcdatamodel
elements 13KB
layout 4KB
ParseOperation.h 3KB
Earthquake.m 3KB
SeismicXMLAppDelegate.h 4KB
RootViewController.h 3KB
Earthquake.h 4KB
SeismicXMLAppDelegate.m 15KB
RootViewController.m 14KB
ParseOperation.m 16KB
ReadMe.txt 2KB
共 30 条
- 1
ToccaLee
- 粉丝: 1
- 资源: 41
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页