Inherits from NSObject
Declared in IntentKit.h

Overview

A mish-mosh of occasionally-useful methods

Tasks

Class Methods

sharedInstance

+ (instancetype)sharedInstance
Discussion

A static singleton object

Declared In

IntentKit.h

Instance Methods

imageNamed:

- (UIImage *)imageNamed:(NSString *)name
Discussion

Returns an image with a given name. Acts like [UImage imageNamed:], but fetches from the main IntentKit bundle.

Parameters

name

The filename of a PNG image, no extension

Return Value

a valid UIImage, or nil if no such image exists in the bundle

Declared In

IntentKit.h

isPad

- (BOOL)isPad
Discussion

Determines whether or not the current device is an iPad.

Return Value

YES if being run on an iPad (UIUserInterfaceIdiomPad), otherwise no.

Declared In

IntentKit.h

preferredLanguages

- (NSArray *)preferredLanguages
Discussion

An array of the current device’s preferred languages.

Declared In

IntentKit.h

topViewController:

- (UIViewController *)topViewController:(UIViewController *)parent
Discussion

Finds the front-most view controller on a given UIViewController

Parameters

parent

A UIViewController that may or may not have nested view controllers (modally presented, displayed as part of a navigation stack, etc)

Return Value

The currently-frontmost UIViewController with parent as a parent node.

Declared In

IntentKit.h

visibleViewController

- (UIViewController *)visibleViewController
Discussion

Finds the front-most view controller in the entire app.

Return Value

The currently-visible UIViewController

Declared In

IntentKit.h