CalStoreCalendarStoreViewControllerDelegate Protocol Reference

Conforms to NSObject
Declared in CalStoreCalendarStoreViewController.h

Overview

The CalStoreCalendarStoreViewControllerDelegate protocol describes the interface CalStoreCalendarStoreViewController delegates must adopt to respond to events.

Closing

– calendarStoreViewControllerDidClose:

Sent when the user taps the Close button.

- (void)calendarStoreViewControllerDidClose:(CalStoreCalendarStoreViewController *)calendarStoreViewController

Parameters

calendarStoreViewController

the CalStoreCalendarStoreViewController the user interacted with.

Discussion

If defined, the delegate is responsible for dismissing the CalStoreCalendarStoreViewController. If not defined, the CalStoreCalendarStoreViewController will dismiss itself.

Declared In

CalStoreCalendarStoreViewController.h

Changing Country

– calendarStoreViewController:willChangeCountry:

Called when the user changed the country of the calendar store and before the changes will be applied. The return value of this method will be used as the new country.

- (NSString *)calendarStoreViewController:(CalStoreCalendarStoreViewController *)calendarStoreViewController willChangeCountry:(NSString *)location

Parameters

calendarStoreViewController

the CalStoreCalendarStoreViewController the user interacted with.

location

the new country the user wants to change to

Return Value

Return the country the Store should change to. If you don’t want to override the country to a different value, return location or nil.

Discussion

If implemented, you must return the new country code the store should change to. Return nil or location to change to the country the user just picked.

Declared In

CalStoreCalendarStoreViewController.h

– calendarStoreViewController:didChangeCountry:

Called when the user changed the country of the store and after the changes are applied. The store will be refreshed.

- (void)calendarStoreViewController:(CalStoreCalendarStoreViewController *)calendarStoreViewController didChangeCountry:(NSString *)location

Parameters

calendarStoreViewController

the CalStoreCalendarStoreViewController the user interacted with.

location

the new country the store changed to

Declared In

CalStoreCalendarStoreViewController.h

Changing Language

– calendarStoreViewController:willChangeLanguage:

Called when the user changed the language of the calendar store and before the changes will be applied. The return value of this method will be used as the new language.

- (NSString *)calendarStoreViewController:(CalStoreCalendarStoreViewController *)calendarStoreViewController willChangeLanguage:(NSString *)language

Parameters

calendarStoreViewController

the CalStoreCalendarStoreViewController the user interacted with.

language

the new language the user wants to change to

Return Value

Return the language the Store should change to. If you don’t want to override the language to a different value, return langauge or nil.

Discussion

If implemented, you must return the new language code the store should change to. Return nil or language to change to the country the user just picked.

Declared In

CalStoreCalendarStoreViewController.h

– calendarStoreViewController:didChangeLanguage:

Called when the user changed the language of the store and after the changes are applied. The store will be refreshed.

- (void)calendarStoreViewController:(CalStoreCalendarStoreViewController *)calendarStoreViewController didChangeLanguage:(NSString *)language

Parameters

calendarStoreViewController

the CalStoreCalendarStoreViewController the user interacted with.

language

the new language the store changed to

Declared In

CalStoreCalendarStoreViewController.h

– calendarStoreViewController:shouldShowViewController:afterSelectingItem:

Called when a CalStorePageItem is selected by the user and a ViewController will be ‘shown’ (either presented or pushed). Return YES to invoke default behavior or NO if you want to take over showing the viewController or item.

- (BOOL)calendarStoreViewController:(CalStoreCalendarStoreViewController *)calendarStoreViewController shouldShowViewController:(UIViewController *)viewController afterSelectingItem:(CalStorePageItem *)pageItem

Parameters

calendarStoreViewController

the CalStoreCalendarStoreViewController the user interacted with.

viewController

A UIViewController subclass that will be shown for the selected item. If YES is returned, the UIViewController will be presented modally, pushed or made visible depending on its type.

pageItem

the CalStorePageItem subclass which the user selected in the UI and for which a viewController will be presented

Return Value

return YES to invoke default behavior (the viewController will be shown automatically), return NO to not invoke default behavior and present the viewController yourself or do something completely custom with the pageItem.

Discussion

Different UIViewController classes will be shown depending on the selected item type and state.

Warning: Apps should not make assumptions about the (internal) type of the UIViewController being shown.

Declared In

CalStoreCalendarStoreViewController.h