views:

58

answers:

1

Hello,

Hello,

I am quite new to iphone development. I have a situation here. I have some labels which can be dragged across the screen.

When any of these labels are dragged to some textfield and released over a textfields UIlabel test is assigned to that text field.

Now the problem is this I want to assign the text of UILabel to some specific position in textfield according to release of textfield

i.e If user releases at the beginning of text field then it should be appended at the beginning and if somewhere near end of text of textfield then it should be appendended at the end.

Can you help me to fabricate this condition.

Thanx in advance

A: 

I'm fairly certain the only thing you can modify in terms of the text positioning in a textfield is the justification. If you want it to be on an exact pixel you'll have to subclass textfield and probably redo the drawing, and that all sound like it'd end up in a mess.

Not sure if it'd help in your situation, but you can create an animation to smoothly move the text from the dropped position to the default position it would appear in the textfield.

mjdth