Show TOC

Setting Value Help OptionsLocate this document in the navigation structure

You can directly set the collection for value helps for phone title, currency title, and address title types.

To set a collection, use:
// create the phone number cell
MAFPhoneNumberTableViewCell* cellPhoneNumber = [self.mediator getPhoneNumberTableViewCell];

// add/set custom phone types
NSArray* phoneTypes = [[[NSArray alloc] initWithObjects:NSLocalizedString(@"SAP Phone",@"SAP Phone"), NSLocalizedString(@"Mobile 1",@"Mobile 1"), nil] autorelease];
cellPhoneNumber.phoneTypes = phoneTypes;
Showing Value Help Screens on iPad
For iPad, instead of presenting a value help in a modal screen, use the pop-up controller to show the list of valid values close to the locale-aware control that is requesting it:
// MAFValueHelpMediatorDelegate implementation
- (void)valueHelpMediator:(MAFValueHelpMediator *)sender requestsDisplayOfValueHelpController:(MAFValueHelpController *)controller requestor:(UIView *)requestor
     if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){ // iPad specific (use PopOver)
        UINavigationController* ncCurrencySelector = [[UINavigationController alloc] initWithRootViewController:controller];
        UIPopoverController* pcCurrencySelector = [[UIPopoverController alloc] initWithContentViewController:ncCurrencySelector];
        pcCurrencySelector.popoverContentSize = CGSizeMake(350, 500);
        CGRect rectTrans = [requestor.superview convertRect:requestor.frame toView:self.view];
        [pcCurrencySelector presentPopoverFromRect:rectTrans inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft | UIPopoverArrowDirectionRight animated:TRUE];
        // release controllers appropriately 
        // …
Changing Value Help Presentation Mode

You can avoid the bridging functionality of the MAFValueHelpMediator by directly setting your custom accessor delegates on the locale-aware controls. By default, the mediator plays the role of the accessor delegate toward locale-aware controls. The accessor delegates are always called back when an action is triggered on the control itself, for example, editing started, ended, or when a value help is requested. These messages contain the value help collection to show as well, and no mediator is used because you set your custom MAFValueHelpAccessorDelegate for the control; however, you must present the value help collection appropriately.

The delegate contains only optional methods. To make a custom accessor delegate, implement this one in your custom delegate implementor class:
// MAFValueHelpAccessorDelegate implementations
- (void) valueHelpAccessor:(id<MAFValueHelpAccessor>)sender