Making an iPhone Application Configurable
For my application I have multiple customers. For each customer there is a different set of images and server URLs. To address this issue I have created customer-specific files. So according to the target selected, the specific file is used for getting the images and dynamically loading them in the UI. But this method works only in case of similar layout for each customer. So precisely saying, the method I am using currently is not scaleable.
Following are the issues which I am facing right now:
The real problem comes when I need to change the layout according to the customer. In case of few screens I can dynamically set the position of elements in UI but its not a feasible solution in case of several XIB files. What is the best industry standard to achieve this?
Addition/deletion/modification of a feature is an issue. Suppose I have a Tab bar 开发者_StackOverflow中文版in my application. To provide 6 features to a customer, I have 6 different TabBar items in the app. Suppose if one the customer doesn't want any one of the feature from those. Is using a simple if-else to suppress any specific tab a right way to achieve this?
My approach is to not use XIB files and create all objects programmatically.
I have plist configuration files which define the objects in the app going so far as to define:
1) if the app starts with a tabbar or not, (if so how many items, their names and what viewcontrollers they refer to), 2) the viewcontrollers and tableviewcontrollers, 3) any buttons or images or text fields within the view of each viewcontroller etc.
then each version of the app can have different plist files and associated resources.
精彩评论