Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-12-2011, 08:39 AM   #1 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 14
arbi is on a distinguished road
Default Cursor in UITextField

Hi,

how can I set the cursor on a specific position in a TextField?
arbi is offline   Reply With Quote
Old 05-12-2011, 09:14 AM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

I don't think you can.
baja_yu is offline   Reply With Quote
Old 05-12-2011, 09:18 AM   #3 (permalink)
Registered Member
 
manojb's Avatar
 
Join Date: Jan 2011
Posts: 263
manojb is on a distinguished road
Default

Quote:
Originally Posted by arbi View Post
Hi,

how can I set the cursor on a specific position in a TextField?
Click me
__________________
U can not fail, until U Quit...

Manoj B

Last edited by manojb; 05-12-2011 at 09:20 AM. Reason: Relatively solves the problem... Unless u go tricky with UITouch events
manojb is offline   Reply With Quote
Old 05-12-2011, 09:48 AM   #4 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Quote:
Originally Posted by manojb View Post
Are you sure that's it? He asked about setting cursor position and that article seems to be about pasting text.
baja_yu is offline   Reply With Quote
Old 05-12-2011, 10:02 AM   #5 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 14
arbi is on a distinguished road
Default

Quote:
Originally Posted by baja_yu View Post
Are you sure that's it? He asked about setting cursor position and that article seems to be about pasting text.
Yes, you're right (sorry about my bad English):
What I want to do is to set the cursor inside the textfield on a special position when textFieldDidBeginEditing is called.
arbi is offline   Reply With Quote
Old 09-14-2011, 06:22 PM   #6 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 8
Cori is on a distinguished road
Unhappy Is there a way to find out the current cursor position within a UITexField?

I'm stumped! I created a custom input view for an ordinary UITextField. My input view has about 15 buttons that replaces the standard keyboard input. The thing is if the user tries to move the cursor within the field to insert/delete a char, I need to find out the current cursor position within the text field so that a character can get inserted to that correct position. Same is true when the user taps the equivalent of Erase button, the character should be removed at the current cursor position.

I read about the UITextInput Protocol but it's too complicated for my simple needs. However, I would be willing to go through all the trouble of customizing a keyboard interface but there is no sample code. I have to use a custom input view since there are specific valid chars for input. The custom view should behave like a typical keyboard, with insert and erase at cursor position.

Would really, really appreciate the help on this. Thanks so much!!
Cori is offline   Reply With Quote
Reply

Bookmarks

Tags
cursor, location, position, uitextfield

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 359
6 members and 353 guests
doffing81, dre, iOS.Lover, Kirkout, MikaelBartlett, PlutoPrime
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:02 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0