NKIssue Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/LIbrary/Frameworks/NewsstandKit.framework |
| Availability | Available in iOS 5.0 and later. |
| Declared in | NKIssue.h |
Overview
An instance of the NKIssue class represents an issue of a newsstand content application.
An NKIssue object must have a name and a date. When you create the object using the addIssueWithName:date: method of the NKLibrary class, you must supply these two values. In addition, an NKIssue object can be associated with one or more assets that are downloading. These assets are represented by NKAssetDownload objects, which you create and associate with the issue by calling the addAssetWithRequest: method. If there are downloading assets, the NKIssue object has a status of NKIssueContentStatusDownloading.
As assets are being downloaded for an issue, you should put the processed (for example, unarchived or assembled) issue assets in the sandbox file-system location identified by contentURL. After all downloads of assets for an issue have completed, NKIssue posts the NKIssueDownloadCompletedNotification notification which objects in an application can observe.
Tasks
Managing Issue Assets
-
– addAssetWithRequest: -
downloadingAssetsproperty
Accessing the Location of Issue Content
-
contentURLproperty
Accessing Attributes of an Issue
Properties
contentURL
The location in the application sandbox where issue content should be stored. (read-only)
Discussion
The application, after processing downloaded assets, should write the issue content to the filesystem location identified by this property.
Availability
- Available in iOS 5.0 and later.
Declared In
NKIssue.hdate
The date of the newsstand issue. (read-only)
Discussion
This date is provided when the NKIssue instance is created through the addIssueWithName:date: method of NKLibrary.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
NKIssue.hdownloadingAssets
Returns the assets that are currently downloading for the newsstand issue. (read-only)
Discussion
Each item in the returned array is an instance of NKAssetDownload. If there are any downloading assets for the issue, the representing NKIssue object has a status of NKIssueContentStatusDownloading.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
NKIssue.hname
The name of the newsstand issue. (read-only)
Discussion
This name is provided when the NKIssue instance is created through the addIssueWithName:date: method of NKLibrary. The name must be unique across all issues in the library.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
NKIssue.hstatus
The status of the newsstand issue. (read-only)
Discussion
An issue’s status is either available, downloading, or none. Each of these reflect whether assets are downloading for the issue and if there is issue content at contentURL. See the description of the NKIssueContentStatus type for more information.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
NKIssue.hInstance Methods
addAssetWithRequest:
Adds an asset to the list of assets to be downloaded and returns an instance representing that asset.
Parameters
- request
An object representing a URL request.
Return Value
An instance of NKAssetDownload, which represents an issue asset that can be downloaded from the application’s server. Returns nil if there a problem creating the object.
Discussion
You must send downloadWithDelegate: to the returned object to begin the downloading of the asset.
Availability
- Available in iOS 5.0 and later.
See Also
Declared In
NKIssue.hConstants
NKIssueContentStatus
The status of the newsstand issue.
typedef enum {
NKIssueContentStatusNone,
NKIssueContentStatusDownloading,
NKIssueContentStatusAvailable,
} NKIssueContentStatus;
Constants
NKIssueContentStatusNoneAssets are not downloading for the issue and there is no content at
contentURL.Available in iOS 5.0 and later.
Declared in
NKIssue.h.NKIssueContentStatusDownloadingThe issue has assets that are currently downloading.
Available in iOS 5.0 and later.
Declared in
NKIssue.h.NKIssueContentStatusAvailableDownloading of assets is not taking place and there is issue content at
contentURL.Available in iOS 5.0 and later.
Declared in
NKIssue.h.
Declared In
NKIssue.hNotifications
NKIssueDownloadCompletedNotification
The NKIssue object is the posting object. There is no userInfo dictionary.
Availability
- Available in iOS 5.0 and later.
Declared In
NKIssue.h© 2011 Apple Inc. All Rights Reserved. (Last updated: 2011-10-12)