views:

191

answers:

2

Hi,

I am actually developing a view with a text field that I want to be dynamic.

Was dynamic means ?

It means, when you type something in it, there is a suggestion list populating beside the text filed. I have already coded that, and it works fine !

Representation of what I have right now :

[ text field ] [ OK Button ]

[ suggestion 1 ]

[ suggestion 2 ]

[ suggestion 3 ]

Now what I want is to, when I select a suggestion in the list, add an item before the text field with for title the suggestion label, displaying like that :

< selected 1 > < selected 2 > [ text field ] [ OK ]

Has you imagine, the width of all these elements will be too large to fit in the screen. I want all that to be slidable from left to right with the finger.

What do you think about this ?

To you think it can be realized ?

Thanks in advance !

+1  A: 

You want to create a UIScrollView with the size that you want. You then change its contentSize to the height/width that you want it to scroll. For example, you may want to create a UIScrollView that is 320px wide, but the contentSize is 700 px wide. This allows the view to scroll side to side. You will add your labels and such as subviews of this scrollview.

rscott
Thanks for this answer !I'm trying this, I think it's a good solution, most boring is managing the placement of elements in relative position.I'll make a best feedback when I'm done with this.
Dough
A: 

Working fine with an UIScrollView, many thanks !

Dough