C# Class Newsstand.SampleCode

This class contains the code shown in the article
Afficher le fichier Open project: xamarin/monotouch-samples Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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
Résultat void

GetLibrary() public static méthode

public static GetLibrary ( UITextView display ) : void
display UITextView
Résultat void

PopulateLibrary() public static méthode

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
Résultat void

Read() public static méthode

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
Résultat void

SetReading() public static méthode

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

UpdateIcon() public static méthode

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
Résultat void