Cody C
Cody C

Reputation: 3127

Creating a user configurable UI in ios

I'm writing an app in which there will be user defined "categories" which will consist of a label and each category will have a user defined list of "items" which will be UIButtons. I want a user to be able to layout the user interface to their choosing. What's the best way to implement this? Any example code out there?

Edit: Just to make myself clear, I have groups of buttons with a group "heading". I'd like users to be able to move these buttons around inside a group and also to arrange the groups as a whole. It's okay if they have to enter some sort of "edit mode" to move things around.

Upvotes: 7

Views: 506

Answers (2)

Vidya Murthy
Vidya Murthy

Reputation: 530

You could use touch handling methods to enable drag-drop type of rearranging of buttons. UIPanGestureRecognizer is a useful class for this. A reference for this can be found here.

Upvotes: 1

suda
suda

Reputation: 2644

Probably the easiest way is to use editable UITableViews with UITableViewStyleGrouped style (just like Settings.app). Then you can add, remove and arrange items inside groups. You can show it as "edit mode" view.

Here are some useful posts about it:

Upvotes: 5

Related Questions