Making an iPhone Application Configurable - iphone

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 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.

Related

How can you add iOS buttons and features to a Table View based app?

So basically I have made a storyboard based app which consists of table views and text. It is designed to help new programmers like a handbook. You have a table view which allows you to choose a language, a table view which allows you to choose a section (eg initialisation) a table view to choose a subject (e.g. integer) then a text view of how to go about this.
When it was reviewed, they said
Did not include iOS features. For example, your app was just largely
text table views. It would be appropriate to use native iOS buttons
and iOS features other than just web views, Push Notifications, or
sharing.
I feel like adding these things would degrade from the simplicity and educational purpose of the app. Also, I feel it might be more difficult to navigate if its all iOS button based. Also it might be more difficult to add things later.
So how would you go about adding these things to a table based app so that it can pass the review? I just don't know what they want me to add/change. I have just added a title page with a background image and iOS buttons that direct to the main section a small section and the contact us page. What else can I do?
how would you go about adding these things to a table based app
I'd start by trying to forget about what I'd already done (since that was rejected) and ask myself: how can I design this using the tools available so that the user can quickly get to the information they need?
UIPickerView comes to mind. Instead of going through three screens just to say what you want, a picker with three sections would let you select all three parameters at once.
It'd be nice if you could provide access to the information in the app several ways. What if I want to browse through all the topics? Do I have to choose one section at a to,e, or can I just start reading? A search feature would be nice, so I can find stuff even when I don't know what section it's in. A tab bar and search field would be useful for these.
Perhaps the most important thing is that however it's designed, your app should look polished. It should look like you spent time making it useful and beautiful. Give it some personality.

Help with Application Settings

I'm developing the settings page for an iPhone application I'm working on. The basics are simple enough but there are some interesting things I've seen in the settings for some of the default iPhone and I was wondering if they are easy to create.
Two things in particular are having a UITextView as a child pane (an example of this is the signature in the Mail app settings) as well as having settings appear and disappear based on a switch (an example would be in the Wifi settings).
Any ideas if these are somewhat easily achievable?
EDIT: I'm aware I can achieve a similar effect by creating a custom settings page. What I want to know is if the things I mentioned are possible for application creators.
Use UITableView and build your custom subclasses of UITableViewCell class for various settings. You can easily manipulate a table view for making things appear and disappear dynamically.
As #Kakosquid suggested you can try a table view with custom cells. You can go through this tutorial for more info on custom cells

Best approach to create a "settings" dialog page in iPhone [duplicate]

This question already has answers here:
How to create a UITableView with editable components?
(2 answers)
Closed 3 years ago.
I need to present the user with a screen with controls (i.e. a dialog). It will display some labels and different types of controls so that the user can do some configuration:
select a color (custom color picker)
select a line width (slider)
select one value from a list of values (UISegmentedControl?)
enable / disable one option (On/Off)
...
I am evaluating different alternatives:
Create the layout with labels and controls in InterfaceBuilder
Use a UITableView, so that each cell contains a label and its control
I like option 2 because it is similar to iPhone Settings app, and it makes the screen look organized, giving you sections, scroll..., but it is a real pain to create in code all different cell layouts, taking into account each row heights...
The solution has to be easiliy maintainable, allowing easy reuse of code, DRY (low repetition), data-driven...
Is there a recommended or standard aproach to do this?
Instead of implementing it yourself you might also like to consider some of the open source solutions. I use InAppSettingsKit in my app. There are a few minor UI glitches but it works well. I also evaluated mySettings (indeed I submitted a couple of patches) and InAppSettings.
Even if you don't use them, you might be able to crib a few ideas from them.
You can create the tableview cells in IB and then just create IBOutlets to each cell, and then return each cell in the data source method (forgotten the exact name of it, its where you normally create cells)
You could create a cell in IB for each cell or create different types of cells in IB, say one slider based cell, etc and programmatically change the text, etc.
This is staticly creating a tableview, theres an Apple guide on it somewhere.
you said it. use a UITableView and create custom UITableViewCells (probably in Interface Builder!) and add these in.
Also, as far as selecting a value from a list of values.. a drill in UITableView (embed the root UITableView in a navigation controller) with all the options and then a checkmark is probably advisable (this is how most apps handle this behavior). The On/Off button is more suited for UISegmentedControl.
There are great examples of this in this book.
Good luck.

Layout Manager, or is there a better solution?

I have a table view where cells can display a variable amount of information. For example, the first cell could display 2 labels, the next cell 5 labels, and the third cell could display 1 label. The cell contents are stored in managed objects.
I would like to make this data driven, where I have a plist to configure the cells. I'm thinking that I can create a layout manager that reads in the config data and can intelligently determine how to display the labels.
Is there a better way to do this with UIKit? I realize that ultimately I could use Core Text to do the text rendering, but I would like for that to be an implementation detail. For starters I'd be happy with just have UILabels that are dynamically setup.
EDIT:
One side effect of making this driven from a configuration file is that I could update these configurations after the app has been deployed. I might consider generated xib files for download as well, but ideally I'd like to only delivery binary plists.
If all you're doing is configuring a single kind of table view cell with a variable number of labels, it seems like that's just a one-off piece of code for laying out the right number of labels. I can't quite tell from your question what your experience level with doing programmatic layout it; if you're new to doing UI outside of IB, let us know.
Speaking to the more varsity idea of a "layout manager", do consider that the NIB/XIB system is effectively a data-driven layout engine itself. If you're thinking about something that's generic enough to specify explicit layouts and properties of views, consider that that's what XIB files basically are-- a schematized XML layout. See the command line tool ibtool's documentation (manpage here) to learn more about how you can manipulate them.
If your layout needs are specific enough to your app but too general to handle with a set of fixed XIBs, then consider a lightweight manager like you describe. But I would think hard before going off and building something super-generic. The equivalent of Zawinski's law here is that any layout manager will eventually end up incorporating more and more of the XIB functionality.

How to use conditional view in fuelphp?

I've a website built on fuelphp framework. I want to make a new version of this website with new design. I want to keep the both design.
I've thought the following two ways-
Put a button on my website as Old UI / New UI or
Use http://example.com/beta
As my changes would be only on views I don't want to duplicate all the controllers. I just want to load the views dynamically with a condition.
How can I do that?
Themes would be perfect for this. It allows you to have different grouped sets of views that you can switch between by changing the active theme.
Documentation: http://fuelphp.com/docs/classes/theme/introduction.html