How can I make the data persistent when using plist ?

I have a UITableView table1. And when I touch any cell in the table a new UIViewController appears and it have two UITextField's name and description. After entering the data in both the text fields I used the save button to save them. In save method I wrote the code for the data to be stored in plist.
-(void)save:(id)sender
indexOfDataArray = temp;
NSString *string1 = [[NSString alloc]init];
NSString *string2 = [[NSString alloc]init];
string1 = nameField.text;
string2 = descriptionField.text;
NSDictionary *myDict = [[NSDictionary alloc] initWithObjectsAndKeys:string2, string1, nil];
[myArray addObject:myDict];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *path = [documentsDirectory stringByAppendingPathComponent:@"VideoData.plist"];
[myArray writeToFile:path atomically:YES];
UIAlertView *alertMesage = [[UIAlertView alloc] initWithTitle: @"Save Alert" message:@"The data entered is saved" delegate:nil cancelButtonTitle:@"cancel" otherButtonTitles:nil] ;
[alertMesage show];
[alertMesage release];
[myArray retain];
But the problem is every time I restart my application the data in the plist is deleted. How can I retain the data in the plist name I specified ?

I think yes, I am specifying only one file name to store in the path. I understood my where I am wrong.
If I added data in plist for two items(item1 and item2). And again I need to add next two items(item3 and item4) . How can I make item3 and item 4 do not replace item1 and item2 ?
Thank You.

Similar Messages

  • How can i write the data to PIC16F819 using labview?

    how can i write the data to PIC16F819 using labview?
    Need help!
    im using labview in gathering the datas that i need to right to the PIC, then after getting all the datas i am using another program which is ICD2 in order to write it to the PIC. Is it possible to do this task through LV? coz we are spending a lot of time transferring the data from LV to ICD2 manually and its prone to mistake as well.
    any suggestion?
    thanks,
    Pedz

    LabVIEW does not currently have a built-in method to communicate with
    i2c, but there are other vendors that sell devices to communicate in
    this manner with LabVIEW development kits.  One that I know of is
    from MCC... here is a link:  http://www.mcc-us.com
    They sell a device called iPort, and then you can buy LabVIEW VIs to go with it.  I hope this is helpful to you!
    john m

  • How can I include the Frame Number  when using "Export Frame"?

    Im using the button at the bottom right of the Playback Control Panel called "Export Frame".  This does exactly what I need but I have a lot of frames that need single frame exporting. How can I get the file name to automaticly include the frame number at the end of the file name? 
    For example, instead of it displaying "Sequence 01.Still001"  by default.  I would like for it to display "Sequence 01_0001"   Letting me know that is frame 0001.
    This is possible, correct?

    Well what about in the export option using CTRL + M?  I saw a coworker using this method in an older version of Premiere, but we can't enable it on CS5.5.  Being able to export a single frame as a bmp that has the frame number at the end of the file name.
    Example:
    Output Name: Sequence 01_0001.bmp
    Under Video Basic Setting is:
    Export As Sequence UNCHECKED
    Field Type: Progressive
    Frame number still doesn't show at end of file name.  What are we missing?

  • How can I make the background inactive when I show a popup in Windows phone 8.1..?

    I have created a popup in Windows phone 8.1. But the user can click buttons in the background. Can I disable this feature of popup...ie. I want the background to be unresponsive when popup is shown.
        How to achieve this....? 

    There are a couple ways to do this:
    If you set popup.IsLightDismissed = true, when the user taps the background, the background will be unresponsive when the user taps the background. HOWEVER, tapping the background will cause the popup to disappear immediately.
    When you open your popup, you can set Window.Current.Content.IsHitTestVisible = false, that should make the background untappable. However, you'll need to set .IsHitTestVisible back to true once the popup is closed, otherwise your app will be unresponsive
    until the user closes and restarts it. You can subscribe to the popup.Closed event to tell when the popup is closed.
    Ryken Productions

  • How can I make the "double hyphen" when hyphenatin usign the Brazilian Portuguese dictionary?

    The CS5 InDesign used to do what I am calling double hyphen. However since I started using the CS6 the Brazilian Portuguese dictionary does not recognize that function. In Portuguese when you have a word with as hyphen like diga-me it should be hyphenated like this:
    diga-
    -me
    The CS6 is hyphenating like this:
    diga
    -me
    I have tried to edit these kind of words in the dictionary but I couldn't include a hyphen in the editing box.
    Does anyone knows how can I fix this?
    Thank you

    just had same problem and find a solution, wich is very tricky:
    go to preferences / dictionary
    with the "Portuguese: Ortographic Agreement" selected, change "Hyphenation" from "Hunspell" to "Proximity":

  • How can I increase the thumbnail size when using Safari to upload an image to a website?

    I upload many images to multiple websites and when using Safari to upload these images, the thumbnails are so small I can barely make out what the image is. I can easily figure out how to increase the thumbnail size when viewing them in Finder and set the default to my liking, but I cannot seem to find a way to do this in Safari. The last topic I saw on this was form 2013 and have not seen any update. Is there a way to do this?

    Delete all unused, invisible layers.
    Sometimes zip compression is better than jpg compression (in the pdf output settings). Zip is lossless, and works better with non gradient colour or no images.
    Flattening the image before you save it to pdf can reduce the file size if you are using jpg compression.
    Post a preview of your pdf and we can comment further on how to reduce the file size.

  • How can you keep the file name when using "Download Linked File As..."?

    I'm a longtime PC user finally making the transition to Mac.  Some of the tasks that seemed so simple in Windows have really stumped me!  One of the tasks I do frequently is download files into specific folders.  After much looking, I finally found the "Download Linked File As..." option if I right-click on the download link.  The problem is, when I choose this option, I lose the file name.  I get a window in which I can choose the desired folder, but the filename is always "0".  If I want to keep the filename (and I usually do), I have to type it in manually.  Is there anyway around this?

    You can post a screen shot by clicking on the liitle Camera icon above your reply.  :)
    Just checked on 10.7.4+, still the same, something is borked about your install, to see if we need to re-install...
    To find out if it's system wide or user specific, try this...
    Open System Preferences>Accounts, unlock the lock, click on the little plus icon, make a new admin account, log out & into the new account.
    Does it work in the new account?

  • How can I make DAQ VIs visible when using NI-DAQ 4.9 with LabVIEW 6.0?

    My operational system is Windows 98, I am using a AT-DSP2200 card and is configured. I have installed a NI-DAQ 4.9 (the last for this card) and I use Labview 6.0, but I can not find the DAQ VIs on the functions palette. How can I solve this?

    Hello;
    That version of the driver is too old to work with Labview 6i. The oldest version of NI-DAQ that one can combine with Labview 6i is version 6.1.
    You will need either to use another version of Labview, or to investigate a replacement hardware that you can use with newer versions of NI-DAQ.
    Regards
    Filipe A.
    Applications Engineer
    National Instruments

  • How can I monitor the Session Cache when using HTTP Session-Replication?

    I want to see the session cache content

    To see the list of session IDs in the cache you can iterate over the keys of the cache returned from the following code:
    NamedCache cacheCatalog = CacheFactory.getReplicatedCacheService("$FilterService$").ensureCache("CoherenceSession.CATALOG", getClass().getClassLoader());Then to see the contents of a session you can take a look a the cache returned from the following code:
    String sId = // keys from cacheCatalog
    NamedCache cacheDetails = cacheCatalog.getCacheService().ensureCache(sId, getClass().getClassLoader());Hope this helps.
    We have received your request for a development license and we hould have ti out to you today.
    Later,
    Rob Misek
    Tangosol, Inc.
    Coherence: Cluster your Work. Work your Cluster.

  • How can I adjust the file names when using the "export layers to files" Script in photoshop?

    Currently the standard set up adds "_0000s_0001_" in front of the layer names that I need the new files to use. I'm processing hundreds of images so I'd like to avoid selecting and deleting the extra characters one by one. Any way to automate this or set it correctly before exporting?

    http://forums.adobe.com/thread/688851?tstart=0

  • How can I make the links work when the site is published.

    I am a new iWeb user and have built the website www.realmoroccotours.com and am having a few problems that I hope someone can help me with.
    First - in Iweb everything works fine but when it is published the links in the top and bottom menu do not work. If I clic on the link before the page is fully loaded it odes work. My host gave me the following information but I have no idea what it means or how to fix it. I have rebuilt the whole site but still the same thing happens.
    +> One of your javascript files that you have installed in the header of the main+
    +> page is blocking the screen with transparent image preventing links from+
    +> clicking. Please remove conflicting javascript and reload that page again.+
    Secondly, the site loads very slowly - although not all the time. Any suggestions on how to make it faster loading would be appreciated.

    All it means is that the image is blocking the navigation menu/overlapping - all you need to do is move it out of the way and the menu should work. Do a view all in iWeb and you can then see what is overlapping and what you need to move.
    You could also build your own nav menu if you like so that your site will be found more easily - javascript, which the iWeb menu is, is not always found that easily. You don't need to re-build the whole site - just the nav menu.
    If you want to speed up your site, then you could try using Web Crusher or iWeb Maestro to speed it up - you need to do this post publishing though, so publish to a local folder and then run it through either of these to get rid of the bloated code that iWeb creates and then upload your site.

  • How can I make the page scroll when highlighting

    I can only highlight to the bottom of the screen. Then I have to take that and paste it. Then I have to go back and highlight the rest and take it to be pasted.

    hello missdeezy, when i try this the page is scrolling further automatically when i get towards/beyond the bottom of the page with the mouse pointer - alternatively scrolling with the mousewheel, the arrow-key & the page-up/down-key works during text selection.
    in case this doesn't work for you, you may try to launch firefox in safe mode and see if you can replicate this behaviour there? if not, maybe an addon is interfering...
    [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]

  • When I am connected to my home wifi, it says I am connected but the 4G icon doesn't go away.  How can I make that go away when I am connected?

    When I am connected to my home wifi, it says I am connected but the 4G icon doesn't go away.  How can I make that go away when I am connected?

    When I'm at my home, and on my Wifi, my 4G icon on my LG G2 is still present. No big deal. If the bits can flow via WiFi, that's what they'll do.
    You might try (if you really MUST shut off the cellular radio):
    Settings, Network Connections and More networks. Select Mobile Networks and uncheck Mobile data and data roaming.
    Not sure if that will work - but give it a try.

  • How can i make requirement date in component take the actual day date??

    hello evry one >>>
    why requirement date in component ( service order ) dose not take the
    actual day date when we Withdrawn part from stock >>>> how can i make
    the requirement date take the day date automaticly without change it
    from offset field
    for example :
    when i withdrawn apart in (old service order) .. the requirement date
    take the old date or ( the service order date ) and it dosen't tack
    the day date ( day when i withdrawn part )
    please i whant help & thank you . good luck
    .... omar gamar ...

    Wrong forum:
    http://www.microsoft.com

  • I down loaded sygic on my iPhone 3s but the icon is missing even in the search but when I want to download it again ,it say this application is present, how can I make the icon to show up

    I down loaded sygic on my iPhone 3s but the icon is missing even in the search but when I want to download it again ,it say this application is present, how can I make the icon to show up

    - Have you tried a reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Try syncing  the iPod to your computer. Then delete from iTunes and sync. that should delete it from the iPod. Then redownload it.

Maybe you are looking for

  • Music on ipad not on itunes

    Have synced my ipad with itunes and there are songs that have not transfered over from the ipad. How do I get them from the ipad to itunes without loosing everything?

  • What is the XI 3.1 adminlaunch/launchpad path?

    We have just installed xi 3.1 on our development machine. Does anyone know what the path to the adminlaunch/launchpad is for XI 3.1? Under XIR2 we use this path: http://Server Name:8080/businessobjects/enterprise115/adminlaunch/launchpad.html I would

  • Lightroom 3 sRGB Export

    I have a workmate who supplies JPEGs from Lightroom 3, and has them set to export with the sRGB profile, (I have checked his settings) which is fine as we use them to create PDF files for online use. However, even though they are exported as sRGB the

  • Archiving Old Purchase Information

    Is it possible to Archive old Purchase Information? I have been using ZENworks Asset Manager for several years now and have old purchase information for products that are no longer in the environment. When I run a Compliance Report for a product that

  • How do i put videos on my 6680?

    Hi, im new to the discussions so apologies if this is a common question. I have managed to put mp3s onto my phone, altho i cant seem to get videos on there can anyone possibly tell me how to? Cheers