[iPhone] Problems with UITextFields in UITableView

Hi all,
I have a UITableView in which I want to insert many UITextFields, one per row. Moreover, I want that when I load this UITableView, the first UITextField is selected, and the keyboard appears. Also, I want that pressing "enter" on the keyboard moves the focus to the next UITextField. But... it's not as easy as it looks
I have followed this steps:
1) I have created an EditableCell class, that inherit from UITableViewCell, with an UITextField attribute.
2) In the tableView:cellForRowAtIndexPath: method I alloc and init the EditableCell using the dequeueReusableCellWithIdentifier "pattern". (The reuse of a cell is a mess with UITextFields!)
3) In the viewDidAppear of my table view I obtain the first cell (using cellForRowAtIndexPath -is it correct?-) and I call on it becomeFirstResponder.
4) I created a table data source (of kind NSMutableArray) that I update every time that a UITextFieldTextDidChangeNotification notification arrives.
5) I populate the method textFieldShouldReturn to "loop" between row.
I think that this is a not good solution. It works, but with some "small" problems. Moreover, I think that it is too much... complex.
Do you have any suggestions? Or pointer to articles, books, and so on?
Thank you very much!

I apologize for the insistence, but I'm really interested in answers to this question
Do you use UITextFields in UITableView? Or do you use other alternatives for "data entry" (e.g. registration forms with many fields)?
Thank you!

Similar Messages

  • 3G iPhone Problems with iTunes 9.2: synch problems

    About 3 days ago I started getting this error message when I tried to sync my iPhone 3G with my Outlook 2007: "iTunes could not sync calendars to the iPhone [name of phone] because the sync server failed to sync the iPhone." I tried various ways to try to overcome this including a hard reset of the phone, going through all the settings in iTunes, uninstalling/reinstalling iTunes, etc. etc. etc. Nothing worked. So I called Support.
    The first thing the Tech asked me is whether I installed OS4. I said no, it's too buggy on a 3G: I had tried soon after OS4 came out & my phone got stuck in backup for over an hour, after which point I aborted the process. Plus what would I gain on a 3G? Nothing.
    We talked for a while & he admitted that the issue probably was the fact that the latest versions of iTunes (9.2+) are "supposed to be backwards compatible" with the 3G OS, but that it's really more designed to work with OS4. So the first thing he would have to advise me to do would be to install OS4.
    Since it was a given that I wasn't going to do that, his response was a verbal shrug and a passing remark that I might have to find "some way" to downgrade my 9.2 version of iTunes to 9.1. But of course he couldn't tell me how to do that.
    Meanwhile, during my long talk with Support my Better Half did a Google on "downgrading iTunes 9.2 to 9.1.1". The result was: http://hackstor.blogspot.com/2010/06/downgrade-itunes-92-to-911-macwindows.html
    I followed the instructions on that site & they worked. Curiously enough, my Better Half hasn't been experiencing any of these problems because he did not update his iTunes or try to dl/install OS4. Hmmm... Is there a pattern here???
    My conclusion: I won't be updating my iTunes or iPhone OS until all these bugs are worked out. Will I be buying a 4G in the near future? Hmmm....
    Disclaimer: I am not an iPhone Tech nor did I sleep in a Holiday Inn this week. I can only tell you what happened to me & how my problem was solved. YMMV.

    Yes, I don't disagree with the first part. However, I could sync my iphone (to itunes 9.2.1) when I had 4.1 installed from another computer).
    I think that I am limited to an old os (10.4.11) on my mac as it is old (pre-intel) and therefore I can't update my OS. If this isn't the case, then an update to my OS could solve the problem. I'll check the requirements of the newer OS now.

  • Iphone problem with itunes error 1603 on restore

    I allowed my iphone battery to fully discharge and upon recharging got the error message with a large exclamation mark “please connect to itunes”. When I connected to itunes I was told that the phone was in recovery mode and needed to be reloaded. Itunes went out and downloaded the new firmware and began the install process after I approved the input screen that said it would wipe out all my data. 1/3 of the way through the process I received a message box that told me the process had failed to restore the iphone for an unknown error (number 1603).
    After looking online and calling ATT as well as Apple the best solution I received was to send the iphone in for replacement (i am 5 hours from an apple store). After fiddling around I have managed to solve the problem on my own.
    After trying everything else with no results, I pulled the SIM card out of the iphone and plugged the iphone into my computer. Itunes then reloaded the software and firmware successfully. I then put the SIM card back in and synced it up with itunes and it asked me to confirm the resync. Afterwards it just worked fine.
    My iphone works again!

    "1- suddenly my iPhone 5 lost mobile company signal and word searching appears instead but no signal for the hole day so I changed the sim with other provider and since it gave me the same result I searched the web and the seems no solution other than restore.
    I did restore and update to iOS 7.0.4 but at the restore takes at the last 1% in the last moment of restore it will take loooong time then gave me error 3. And now for more than a month the iPhone stuck with recovery logo. Almost I tried every trick in the book . Change USB cable, port, PC. PC with other OS . Even freezing the iPhone as I read here noooooo result the same happened again and again."
    I have exactly the same problem with my iPhone 5s!

  • [iPhone] Magnify glass not work 2.1 with UITextField in UITableView

    I have a UITable with custom a UITableViewCells that I add a UITextField to.
    In 2.0 the magnify glass sort of worked. You could press and hold on text in the UITextField and the glass would appear. (But once appeared you couldn't drag your finger back and forth to move the cursor, but instead have to tap to move the cursor.)
    In 2.1 I can't get the glass to even appear.
    Is there something I must do to pass along events up the food chain so that the system can process the events for the magnify glass?

    Make sure your table is editable (i.e., its editable property is set to YES). Seems to work as expected when I do that. Took me a couple of weeks to figure this out! See here for more information.

  • IPhone problem with iPhoto 08 and Web Gallery 08

    I have created web photo galleries in iPhoto 08. Then I have opened iWeb08 and created a page an added a web gallery widget for each of the galleries on this page, everything works fine. Now I fire up the iPhone and go to my iWeb page where the widgets are located.
    The problem is the web gallery widget appears on the iPhone screen as a blue cube with a question mark on two sides and some round grey circles on top. I can not access the galleries from iPhone. Are these cubes a representation for some program that the iPhone can't open? Any help is appreciated.

    I'd post your question in the iPhone forum because it seems to be an iPhone issue rather than an iPhoto one.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Upgrading Iphone problem with sim care problem

    Hello,
    I bought my iphone in the U.S. from at&t. Now I am traveling in france. Yesterday I tried to upgrade the iphone to the new ios 6 version and in the end the phone asked me to insert the compatible sim card that came with the phone. I have been using a gevey iphone unlock card with my french sim card so i have never tried to jailbreak my iphone. So I tried to jailbreak the phone so my foreign sim card can activate it, but it just did not work out. Now I am trying to have my original at&t sim card sent to me. I want to know if it will still work to insert my old at&t card to activate my iphone after failing to jailbreak the phone. In addition, because I am traveling abroad, I suspended my at&t service for now, will that affect its ability to activate the phone?
    I would really appreciate if anyone can give me a response to my length problem. Thank you so much.

    and it's a iphone 4

  • IPhone problem with server applications...

    I have been having problems recently using applications that access a "server." Apps such as "maps" and "sportacular" both tell me they have problems connecting to the server. It doesn't matter on my location or availability of a network, the apps still don't work.
    Any help?

    Does the same occur after powering your iPhone off and on, and/or after doing a reset, which is done by pressing and holding the Home button and the sleep/wake or on/off button simultaneously until you see the Apple logo and then release - ignoring the slide to turn off prompt when doing so?
    I haven't experienced the same with the Maps application - not once, but I have experienced this with Sportacular on occasion but only on weekends when there are more sports and more people accessing Sportaculars' servers.

  • IPHONE PROBLEM WITH LATEST FIRMWARE

    I just updated my iphone to the latest firmware and i now i cant synch my iphone with my computer.. every time i do it, it shuts my computer down.
    i'm running window vista
    any suggestion or help

    Oh, that's great news. Well, I'm not messing with my USB Periphs...they are/were all working fine, so I'm going to wait for Apple to come up with a fix for this problem.
    I'm now on my 3rd uninstall/reinstall of the Mobile Support and iTunes.
    After this, that's it. I'll have to wait until someone finds an easier fix. For all of you who got 2.1, enjoy. My phone crashes about 3 times a day and I'd really like it, too.

  • (iphone) problems with PSChildPaneSpecifier Settings.bundle key

    I'm trying to add a PSChildPaneSpecifier key to the Settings.bundle of my app. I created a new settings .plist file for the chile pane and to the best of my understanding followed the instructions in the settings bundle schema reference, however when I open my app settings the child pane table element does not appear. Can anyone point me to some sample code which demonstrates the use of PSChildPaneSpecifier, or share some tips from their experience with this feature about some things I may be doing wrong?

    You probably should check out this Knol:
    http://knol.google.com/k/usman-ismail/iphone-sdk-application-preferences/34oprza nmpe7q/8#
    It helped me a lot!

  • Problems with reloadData in UITableView

    I have a UITableView which is populated by an array, I have a button on the navigaton bar which (when pressed) adds an item to the array and calls [self.tableView reloadData] in the UITableView. This results in numberOfRowsInSection being called and returning the correct number of rows (the number of items in the array) BUT doesn't call cellForRowAtIndexPath.
    I have created a new navigation based application to try and find a solution but have exactly the same problem!
    If anyone knows the answer it would be greatly appreciated, i've been tearing what's left of my hair out for the last day!
    I have put the source for the test project up on my site at www.sofaracing.com/Downloads/Test3.zip

    I should add that it works fine if I pop a modal view up in front of the table and call reloadData before removing the modal view.
    Anyone any ideas?

  • [iPhone] Problem with ABRecordSetValue

    I am using an ABPersonViewController to get an ABRecordRef and then modify one of the ABMultiValueRef's of the person. I am using ABRecordSetValue() to set the updated multi value but for some reason it doesn't seem to save. I have tried using ABAddressBookSave() with no luck. I checked out my modified ABMiltiValue and it definitely has the new value in it before calling ABRecordSetValue(). Has anyone successfully committed a change to the address book using these functions? Any ideas how to get it to commint?
    Thanks in advance

    hi! did you ever get an answer to this question? i'm having the exact same problem! help!
    thanks,
    mark

  • [iphone] Problem with sdk 3.0 - tab bar

    Hi,
    I'm getting the following error when running my project:
    'Directly modifying a tab bar managed by a tab bar controller is not allowed.'
    In version 2.2.1 I can run the app, but in 3.0 I can't. Can someone help me?
    thanks,
    pitteri
    Message was edited by: pitteri

    I haven't worked with 3.0 yet, so can't speak from direct experience, but you might be reporting a bug fix. The 2.x doc says:
    Although a tab bar controller uses a tab bar in its implementation, you should never need to, nor should you, access the tab bar directly.
    So I'd consider the possibility that 3.0 has just tightened up an access point that wasn't meant to be there. I'd look for any code that's been talking to the tab bar and see if there's a workaround. If you don't think you have any such code, post any code that might be involved and maybe someone here can help.

  • Iphone problem with Youtube

    Help! I have Youtube problems, perhaps someone has the answer. My friend Sara uploaded a video to her account from my phone and now whenever I upload a video from my phone (other devices work properly) it uploads to Sara's account. When I look at the Youtube app from my phone it has my account shown. When I upload a video from "pictures" in my phone it shows Sara's account below the video. I've looked through all my settings and can't find her account name listed anywhere. I've deleted the Youtube app from my phone and reinstalled but that doesn't change the issue.

    You were correct Allan. There were several Youtube apps on the phone so when I logged out and in it still did not change the settings until I deleted those apps and found the last remaining one to log into and it works!
    Yay! Thanks for your fine attention to the situation. Good work!
    Kandi
    BTW
    Sometimes I can only find one of my phone apps by doing a search. Is there a way to force the app to the desktop while using it?

  • IPhone :: problem with landscape mode

    I have the strange behaviour when I design UiView using Interface Builder.
    1) I use IPhone OS version 2.2.1
    2) I create UiView using Interface Builder in landscape mode ("First View")
    3) I put two buttons in the right near screen border, create callbacks for it, etc.
    4) Then I launch another view in Portrait Mode, create UiNavigationController, push "First View", enable autorotate to interface orientation and then in the viewWillAppear function implementation I call
    [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];
    5) My "First View" appeares correctly. But I can not press buttons I put on it. If I drag these buttons in the center of the screen, it works. But if I put them near the right border of the view in landscape mode - I can not press any button. "Near" means about 40-50 pixels from right border, in fact - pixels column which X borders are 430 - 480

    There's a whole section in the iPhone programming guide cover this.
    here's a snippet:
    Regardless of how you orient the design surface in Interface Builder, remember that nib files
    themselves have no concept of interface orientation. Views are blank canvases that can be used for
    many purposes, such as presenting content in a horizontal scroll view. Therefore, the size of a view
    does not change its orientation at load time; it is always loaded in portrait mode. It is up to you
    to rotate your views to the appropriate orientation after they are loaded. When you do this depends
    on how you construct your application. If you construct your application using view controllers, you
    can perform this operation in the viewDidLoad method of your view controller objects. If you are not
    using view controllers, you can per form it in the applicationDidFinishLaunching: method after
    creating your views or after loading them from a nib file.

  • [iPhone] Problem with didSelectRowAtIndexPath

    Hi, I have a DetailViewController (UITabelView), a ContentViewController (UIView) and a ContentViewControle.xib. When I click a cell in my DetailViewController i want to slide in the ContentViewController. But it just isnt working. This is my line of code:
    Why doesnt it work? I cant seem to figure it out.
    Tanks alot!

    Do you have a navigationController? I had a similar problem where I followed the Elements example project but neglected to create a Navigation Controller that wraps the view.
    Search for: createNavigationControllerWrappingView* in the Elements source code (it's in the app delegate)
    Once I'd implemented this my didSelectRowAtIndexPath which looks similar to yours worked fine.

Maybe you are looking for

  • Serial Numbers in A Storage Bin

    Dear all, In warehouse management we have serial numbers attached to each item in the warehouse and these items are batch managed. During goods receipt serial numbers are scanned using RF scanner and a transfer order is created for each item. We have

  • 4.1 Webi Publication does not have Delivery Rules

    I have created a publication for a Webi report in 4.1 BOE. I noticed that the publication does not have an option for Delivery Rules, which is available for Crystal Reports. I'm not sure if that is by Design, as I don't know why it would be available

  • Cannot set up home sharing

    Hi, I am running iTunes 11.0.2.26 on a Windows 7 pc.  According to the Apple Home Sharing documentation I found, when I select File -> Home Sharing -> Turn on Home Sharing, and log in with my Apple ID, I should get an option to "Create a Home Share",

  • How to use javadoc tool?

    I am new to Java, I thought you have to manually write all the java doc comments into your source code of java application. Some one told me javadoc tool can actually automatically add the comments for you. so I tried to that with my simpliest HelloW

  • Explain Customer Exit (ABAP) Written in CMOD

    Hi Experts, Please explain what this Customer Exit (CMOD) is performing Here var1 is the user entered expiry date and test1 is the newly created customer exit variable. What happens if user enters 01.05.2008 to 31.05.2008 data: yrr1(4) type n, mn(2)