iOS Developer Library — Pre-Release

Developer

UIKit Framework Reference UIReferenceLibraryViewController Class Reference

Options
Deployment Target:

On This Page
Language:

UIReferenceLibraryViewController

A UIReferenceLibraryViewController object provides a dictionary service to look up the definition of a word or term from within an app. It should not be used to display wordlists, create a standalone dictionary app, or republish the content in any form. More...

Inheritance


Import Statement


Swift

import UIKit

Objective-C

@import UIKit;

Availability


Available in iOS 5.0 and later.
  • Returns whether a definition is available for the given term.

    Declaration

    Swift

    class func dictionaryHasDefinitionForTerm(_ term: String) -> Bool

    Objective-C

    + (BOOL)dictionaryHasDefinitionForTerm:(NSString *)term

    Parameters

    term

    The term to be defined.

    Return Value

    YEStrue if a definition for term is available; otherwise, NOfalse.

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 5.0 and later.

  • Initializes a newly created reference-library view controller to display the definition of the given term.

    Declaration

    Swift

    init(term term: String)

    Objective-C

    - (instancetype)initWithTerm:(NSString *)term

    Parameters

    term

    The term to define.

    Return Value

    The newly initialized reference library view controller.

    Discussion

    If a definition for the term is not available, a localized message is displayed instead. Use the dictionaryHasDefinitionForTerm: class method to determine whether a definition is available before creating instances of this class.

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 5.0 and later.