Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9027485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:45:26+00:00 2026-06-16T06:45:26+00:00

having a bit of panic and really really need some help with this! I’m

  • 0

having a bit of panic and really really need some help with this!

I’m making an app to fill in forms. The layout of the forms are created on a web server, and then the ipad app syncs with it, copies the form database, and then runs it locally.

One type of text field is a UITextView where the user can input text either by writing directly to the field, or by using one of many pre-defined texts (also defined on the web server).

To use a pre-defined text, the user touches/selects the tablecell that is containing the UITextView, and then a category-picker-view is pushed on the screen. On selection of category, the user gets a list of texts, and upon selection of text, the user gets a simple uitextview to edit it before insert. With a save button, the user then gets moved back to the original view where the chosen text is now added.

Flowchart:

 root view with input fields-> category picker -> text picker -> editor 
  /\                                                               |
   '------------------------------save text------------------------'

The problem is that when any other view loads, all other input fields are emptied! The value of the selected field is passed via prepareForSegue, so that one is kept.

I have a save function which saves all fields to the database. I tried to put a call for it inside the prepareforsegue call, but it either crashes or does nothing.

Question: Where could i put the save function? Could/should I do it another way? Thought about putting all tag’s values in a dictionary inside my appDelegate instead of running the save-function, but how could i update it every time an input field is edited?

Also – would putting the categorypicker etc in some kind of popover/modal/popup-view instead of the push segue prevent the values from clearing? I’ve got no experience from such views, could someone give a good starting point? (perhaps a good tutorial rather than heavy apple docs 🙂

I have a deadline for this tomorrow, with LOADS of more things to complete as well, so I’m very very grateful for ANY help!!

Thank you for your time!!
/Dave

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:45:28+00:00Added an answer on June 16, 2026 at 6:45 am

    I think your problem is caused by an absence of a model (in terms of the model-view-controller pattern). A model that represents your form data (e.g., custom object, NSArray, NSDictionary) should be updating the view and should be passed in prepareForSegue, not an input field’s value.

    Specifically, create a new property that maintains the latest data. When the user makes an edit or selects a category for some field, update the model. Then, when you return to your form view controller, use viewDidAppear to update the input fields to their latest values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having a bit of trouble wrapping my head around this one. I'm sure the
Having a bit of trouble getting this right... The main objective is to have
Having a bit of a brain fart right now, but I'm needing help converting
Having a bit of difficulty figuring out how to create a named_scope from this
Having a bit of trouble wrapping my head around Qtimer this morning. Here's the
Im having a bit of a mental block on this one. I got booking
I'm having bit complicated object model that forms a triangle. There is User entity
I am going to activate APNS on my app, so i am having bit
Having a bit of trouble. I need to find all of the countries that
having a bit of a prob with this, though I'm sure it's simple! I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.