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 06-15-2010, 11:24 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 5
mobes is on a distinguished road
Default UITextView/UITextField Disable editing

Hey I am new to iPhone/iPad development and have a pretty basic question.

In one of my views I have a TextView that displays a script that has to be read and a few TextFields that display who is reading the script and the section it comes from. They all auto update correctly but is there a way to disable the keyboard and not allow editing of these fields? I don't want people to have the ability to change any of this text.

any thoughts?
mobes is offline   Reply With Quote
Old 06-15-2010, 11:53 AM   #2 (permalink)
Registered Member
 
Join Date: Mar 2010
Age: 37
Posts: 72
ImpresionesWeb is on a distinguished road
Default

Quote:
Originally Posted by mobes View Post
Hey I am new to iPhone/iPad development and have a pretty basic question.

In one of my views I have a TextView that displays a script that has to be read and a few TextFields that display who is reading the script and the section it comes from. They all auto update correctly but is there a way to disable the keyboard and not allow editing of these fields? I don't want people to have the ability to change any of this text.

any thoughts?
Do you mean?:

Code:
[textView setEditable:NO];
ImpresionesWeb is offline   Reply With Quote
Old 06-15-2010, 12:49 PM   #3 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 5
mobes is on a distinguished road
Default

Yup that worked great thanks dude. Didn't work for the textfields but did for the textviews. I guess text fields are inherently editable which makes sense, will just switch them to labels. Thanks for you help and how prompt it was.
mobes is offline   Reply With Quote
Old 06-15-2010, 01:02 PM   #4 (permalink)
Registered Member
 
Join Date: Mar 2010
Age: 37
Posts: 72
ImpresionesWeb is on a distinguished road
Default

Quote:
Originally Posted by mobes View Post
Yup that worked great thanks dude. Didn't work for the textfields but did for the textviews. I guess text fields are inherently editable which makes sense, will just switch them to labels. Thanks for you help and how prompt it was.
for textfields try:

Code:
[textfield setUserInteractionEnabled:NO];
Can be set in IB too

Or you could try:
Code:
[textfield setEnabled:NO];
ImpresionesWeb is offline   Reply With Quote
Old 06-29-2010, 09:40 AM   #5 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 5
mobes is on a distinguished road
Default

High Five...thanks

Quote:
Originally Posted by ImpresionesWeb View Post
for textfields try:

Code:
[textfield setUserInteractionEnabled:NO];
Can be set in IB too

Or you could try:
Code:
[textfield setEnabled:NO];
mobes is offline   Reply With Quote
Old 08-03-2010, 05:53 AM   #6 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 5
testing is on a distinguished road
Default

Hey guys!

How can I enable or disable the editing of a text field (UITextField) in Interface Builder? I'm using SDK 4.

All talk about "User Interaction", but whatever I do the text field is not editable all the time (default setting?). How can I make that the keyboard come up?

I selected the following:

Interface Builder > Text Field Attributes > View > Interaction > "User Interaction Enabled" is checked

Interface Builder > Text Field Identity > Accessibility > "User Interaction Enabled" is checked

That doesn't work. I placed a new text field on the interface, but here is the same. Only the color of the font of the new text field is gray. What I'm doing wrong?

Thanks in advance!
testing is offline   Reply With Quote
Old 08-03-2010, 11:50 AM   #7 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 5
testing is on a distinguished road
Default

Solved it!

The parent view should also have the "user interaction enabled" checked.

"User Interaction Enabled" is the right thing for choosing editable or not.
testing is offline   Reply With Quote
Reply

Bookmarks

Tags
disable editing, keyboard, uitextfield, uitextview

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: 322
9 members and 313 guests
Absentia, Domele, fiftysixty, givensur, heshiming, linkmx, michaelhansen, PixelInteractive, Sloshmonster
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,892
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

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