PDA

View Full Version : can i put NSTextview in the Iphone




arjit
Feb 20, 2009, 03:57 AM
i have been trying to put NStextview into the Iphone any idea how ? ?
acctually i want i was using UITextView but i dont want the keyboard but i want the cursor blinking so any help with that ? ?
i was thinking to put the NStextview and thn put the NScursor will that work on iPhone ??

any help ??



robbieduncan
Feb 20, 2009, 03:59 AM
You cannot use NSTextView on the iPhone.

arjit
Feb 20, 2009, 04:01 AM
so is there any way i can put the NSCursor on the iPhone ?

arjit
Feb 20, 2009, 04:02 AM
or letting the curser blink while the keyboard is not there .....

robbieduncan
Feb 20, 2009, 04:08 AM
so is there any way i can put the NSCursor on the iPhone ?

No. Look it's really simple: if it's not in the SDK then you can't have it (unless you add it entirely with your own code).

or letting the curser blink while the keyboard is not there .....

Why? It's an iPhone, not a Mac. The built in UI classes work they way they do for a reason: to follow the declared HIG. If your app works in a different way users will be confused at best, annoyed more likely.

arjit
Feb 20, 2009, 04:13 AM
like i m making a textview which on morse code touches entries the word ... so the user is touching the UItextfeild and i m able to interprate it but the curser is not there .... so how do i do that ..... ?? any idea .... :(:(

robbieduncan
Feb 20, 2009, 04:38 AM
like i m making a textview which on morse code touches entries the word ... so the user is touching the UItextfeild and i m able to interprate it but the curser is not there .... so how do i do that ..... ?? any idea .... :(:(

You are trying to do something that is basically unsupported: use a different input method than the keyboard. I can only suggest subclassing UITextView and drawing a blinking cursor yourself...

arjit
Feb 20, 2009, 04:51 AM
You are trying to do something that is basically unsupported: use a different input method than the keyboard. I can only suggest subclassing UITextView and drawing a blinking cursor yourself...

u mean drawing the cursor by Opengl on the UItextview ??
how do i proceed with that ..... ?

robbieduncan
Feb 20, 2009, 04:53 AM
u mean drawing the cursor by Opengl on the UItextview ??
how do i proceed with that ..... ?

No, I meant using Quartz. Either way I'm not about to spend ages explaining it to you: drawing custom views is covered in the documentation: I suggest you read it.

arjit
Feb 20, 2009, 05:16 AM
thanks a lot .... :):) it was nice talking to u ....

arjit
Feb 20, 2009, 06:17 AM
I have subclassed the UItextview to implement the touch event on it.

but now the object of the subclass is not responding becomeFirstResponder any idea why ???

arjit
Feb 24, 2009, 12:53 AM
I an making an application where the input mode is morse code (which is handeled by touch events )so when i am making a UItextview the keyboard pops up i have disbaled the keyboard to handle the touch events but lost the cursor any help how to remove just the key board and retain the cursor ..... becoz i want the user input to be touch so any idea how should i proceed ... ??:(:(

dejo
Feb 24, 2009, 09:54 AM
I an making an application where the input mode is morse code (which is handeled by touch events )so when i am making a UItextview the keyboard pops up i have disbaled the keyboard to handle the touch events but lost the cursor any help how to remove just the key board and retain the cursor ..... becoz i want the user input to be touch so any idea how should i proceed ... ??:(:(
Why show a cursor when the user is not able to type text into that field? Or do you have them tapping their morse code on that textfield and then translating it to text to show in that field? I think a more detailed explanation of the UI and actions and targets would help us to better understand what you are trying to achieve. Perhaps even a screenshot?

robbieduncan
Feb 24, 2009, 09:56 AM
Why show a cursor when the user is not able to type text into that field? Or do you have them tapping their morse code on that textfield and then translating it to text to show in that field? I think a more detailed explanation of the UI and actions and targets would help us to better understand what you are trying to achieve. Perhaps even a screenshot?

This was my understanding of what the OP wanted: a huge text field on screen with a cursor. The user can tap anywhere on the field and the morse taps are interpreted and the characters inserted at the insertion point in the text field.

arjit
Feb 25, 2009, 04:03 AM
This was my understanding of what the OP wanted: a huge text field on screen with a cursor. The user can tap anywhere on the field and the morse taps are interpreted and the characters inserted at the insertion point in the text field.

yaa exactly .... that is what i want the user is able to tap and touch and i am able to get those touches and respond with the text on the UItextview with the text and the cursor on it . any help how is it possible ?