Dynamic text field
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 th开发者_C百科is ?
To you think it can be realized ?
Thanks in advance !
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.
精彩评论