C# Class Newsstand.SampleCode

This class contains the code shown in the article
Show file Open project: xamarin/monotouch-samples Class Usage Examples

Public Methods

Method Description
Download ( UITextView display ) : void

Assets are attached to an issue and then downloaded. The DownloadDelegate can call UIApplication.SharedApplication.BeginBackgroundTask() to 'process' the download, AND set a new icon

GetLibrary ( UITextView display ) : void
PopulateLibrary ( UITextView display ) : void

Use NKLibrary.SharedLibrary.AddIssue() to tell newsstand about issues you want to keep track of. Code can't download an issue until it's in the library, since the library keeps track of downloads and file locations for you.

Read ( UITextView display ) : void

Tell NewsstandKit which issue is currently being read. Prevents that issue being 'cleaned up' if diskspace is required.

SetReading ( UITextView display ) : void

When the user reads an issue, tell NewsstandKit about it so it can keep track

UpdateIcon ( UITextView display ) : void

Change the icon that appears in Newsstand - you would do this when you download a new issue (via a notification or otherwise). Can be done in the background.

Method Details

Download() public static method

Assets are attached to an issue and then downloaded. The DownloadDelegate can call UIApplication.SharedApplication.BeginBackgroundTask() to 'process' the download, AND set a new icon
public static Download ( UITextView display ) : void
display UITextView
return void

GetLibrary() public static method

public static GetLibrary ( UITextView display ) : void
display UITextView
return void

PopulateLibrary() public static method

Use NKLibrary.SharedLibrary.AddIssue() to tell newsstand about issues you want to keep track of. Code can't download an issue until it's in the library, since the library keeps track of downloads and file locations for you.
public static PopulateLibrary ( UITextView display ) : void
display UITextView
return void

Read() public static method

Tell NewsstandKit which issue is currently being read. Prevents that issue being 'cleaned up' if diskspace is required.
public static Read ( UITextView display ) : void
display UITextView
return void

SetReading() public static method

When the user reads an issue, tell NewsstandKit about it so it can keep track
public static SetReading ( UITextView display ) : void
display UITextView
return void

UpdateIcon() public static method

Change the icon that appears in Newsstand - you would do this when you download a new issue (via a notification or otherwise). Can be done in the background.
public static UpdateIcon ( UITextView display ) : void
display UITextView
return void