iPhone SDK Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsMobile ProgrammingiPhone SDK Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 19th, 2012, 05:24 AM
vineesh vineesh is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Posts: 10 vineesh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 34 m 56 sec
Reputation Power: 0
TextField with tableView

How can i insert tableview value from textField.
Please help me.

Reply With Quote
  #2  
Old May 11th, 2012, 04:45 AM
Hansy Hansy is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 13 Hansy Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 3 h 39 m 57 sec
Reputation Power: 0
My suggestion is to not use custom UITableViewCells. I used to do it your way, but there's a much better way. Use the accessoryView property of the UITableViewCell, which you can assign an arbitrary view to, such as a UITextField or UISwitch. It shows up exactly as it would in the Settings application.

Then, when you need to access it, just use

NSString *text = ((UITextField *)cell.accessoryView).text;
However, you must be careful about setting up cells and accessing their values. If any cell goes offscreen, it will be removed and you will not be able to access the text field. What you want to do when setting up your cell is:

cell.accessoryView = nil; //Make sure any old accessory view isn't there.
if (/*cell needs text field*/) {
UITextField *textField = [[[UITextField alloc] initWithFrame:frame] autorelease];
textField.text = savedValue;
cell.accessoryView = textField;
[textField addTarget:self action:@selector(textChanged forControlEvents:UIControlEventValueChanged];
}

...

- (void) textChangedUITextField *)source {
self.savedValue = source.text;
}

Reply With Quote
  #3  
Old January 14th, 2013, 04:58 AM
diyaots diyaots is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2011
Posts: 117 diyaots Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 29 m 41 sec
Reputation Power: 0
Answer of your question.

Hi Dear

I havn’t fully understtod your Question.
If you need to enter TEXT FILD data in TABLE VIEW , this can be done in many ways.
The most simplest way is to store the text field data in STRING and then insert that string in to array. Once your array with data is ready you can simply use that ARRAY to display its data in table view cell.

Thanks
Diya

Reply With Quote
Reply

Viewing: Dev Shed ForumsMobile ProgrammingiPhone SDK Development > TextField with tableView

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap