The code shared between CRS-IUA and Assisted Selling is in the ATGMobileClient project, in the <home>\OCAssistedSellingiOS\ATGMobileClient\ATGMobileClient\UI folder. This folder contains both code and resources such as nibs and images. This code is accessible from the top-level projects Agent and ATGMobileStore using this import syntax:

#import <ATGMobileClient/MyClass.h>

Resources are built as part of a special target named ATGMobileClientResources. To access these resources from a top-level project, you must use this resource bundle instead of the main app bundle. To make this easier, we provide two methods that offer access to this resource bundle:

+ (NSBundle *) atgResourceBundle;

This is part of the NSBundle category NSBundle+ATGAdditions, and is part of ATGMobileClient. It returns the ATGMobileClientResources bundle, allowing for resources such as nibs to be loaded.

+ (UIImage *)locateImageNamed:(NSString *)pName;

This is part of the UIImage+ATGAdditions category in ATGMobileCommon. locateImageNamed looks for images in any resource bundle specified in the ATG_RESOURCE_BUNDLES property in the application plist file. Out of the box, ATGMobileClientResources is the only resource bundle specified in the application plist files, meaning that the behavior of locateImageNamed is as follows:

The styling framework uses UIImage locateImageNamed and any images specified in the Theme.json file are found automatically if contained inside ATGMobileClientResources.


Copyright © 1997, 2018 Oracle and/or its affiliates. All rights reserved. Legal Notices