[Advice Needed] How to reload/restart a ViewController?

Guys,
I'm still new to Object-C/iPhone programming so please bare with me. I'll try and explain my problem.
I have a main ViewController (homescreen) with links to two other View Controllers (lets say Display & Settings).
The Display screen loads a view and displays buttons, either at the top of screen or bottom.
The Settings screen allows the user to choose where to display the buttons (either top of bottom).
My problem is as follows:
1) The user starts the program and goes in the Display screen (buttons displayed at top).
2) They go back to homescreen and into Settings - change buttons to display at bottom.
3) They go back to homescreen and into Display - The buttons are still at the top
Note: A restart to the application fixes the problem.
My questions are:
Could someone please explain what's actually happening?
What's being stored in memory and when?
Could I somehow release the Display ViewController when going back to the homescreen?
Is there a way to achieve the refresh so that it displays the correct information, without having to exit the app?
Sorry for all the questions, like I said above, I'm still new to all this and would appreciate some guidance.
Thanks

My guess is that you create the Display screen view controller and hang onto it.
When you go back to the Home Screen from the Display screen the Display screen gets popped off. The Navigation controller would call a release on it. If you are holding on to the Display screen then it wont be dealloc'd.
After you push the Display screen onto the Navigation controller, call a release on the Display view controller. This will ensure that when you hit Back on the Display screen to the HomeScreen the display screen will be dealloc'd. So the next time you come you want to go to the Display screen from the Home Screen you create a new instance of the Display Screen view controller and pop it onto the stack. This will call the loadView (if you are not using IB) or initWithNibName (if you are using IB) where you can re-layout the view.
If you want to hold on to the Display Screen without having to constantly create a new one then you may want to try to override viewWillAppear method of UIViewController where you can take change the layout if required.
Hope this helps.
-TRS

Similar Messages

  • Advice on how to access photos on an iPad that were synced from a now failed laptop? The question stems from a need to return my current iPad having just taken delivery of a new unit. Thanks

    I am after some advice on how to access photos on an iPad that were synced from a now failed laptop? The question stems from a need to return my current iPad having just taken delivery of a new unit. Thanks

    If you have a dropbox account, there's a free app (probably more) that syncs photos to your dropbox account - picbox. 
    There's also PhotoSync that syncs photos to/from a number of different services and devices.

  • My auto install for Premiere Elements failed and told me i needed to do a restart and try installing again. Having restarted my laptop, how do I install the software? There are two .exe files in the folder - oem and start-up. Which should i run?

    My auto install for Premiere Elements failed and told me i needed to do a restart and try installing again. Having restarted my laptop, how do I install the software? There are two .exe files in the folder - oem and start-up. Which should i run?
    thanks

    for windows you should have an exe and a 7z file.  put both in the same directory and double click the exe.
    Downloadable installation files available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 | 12 | 11, 10 | 9, 8, 7 win | 8 mac | 7 mac
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7 win | 8 mac | 7 mac
    Lightroom:  5.7.1| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5.5, 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • Need advice on how to slice layout

    I am fairly new to web design. I have studied it for two semesters in college, but I have forgotten many techniques since. However, I know enough to follow any advice given.
    What I am seeking is some advice on how to break down my layout. Particularly, I need help deciding how to slice the layout and organize the divs.
    I have a good idea how to slice and manage the header and footer; however, I am puzzled on how I should structure the menu on the right. See the attachment, how the menu drives up from the body content, past the secondary navigation, and into the main image?
    I need help in the middle area there.
    Thank you in advace!
    Hayden W.
    [IMG]http://i19.photobucket.com/albums/b184/HayWet/whetstonelayout.jpg[/IMG]

    If your design comp is in layers, you can toggle layers on/off to save individual elements.
    Taking a Fireworks comp to a CSS Layout in DW
    Part 1 - Initial Design
    http://www.adobe.com/devnet/dreamweaver/articles/dw_fw_css_pt1.html
    Part 2 - Markup preparation
    http://www.adobe.com/devnet/dreamweaver/articles/dw_fw_css_pt2.html
    Part 3 - Layout and CSS
    http://www.adobe.com/devnet/dreamweaver/articles/dw_fw_css_pt3.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • I need to know how to reload  my copy of Adobe Photoshop Elements 11

    i Need to know how to reload my copy of Adobe Photoshop Elements 11

    if you're asking for the pse 11 installation file and if you follow all 7 steps you can directly download a trial here:  http://prodesigntools.com/photoshop-elements-11-direct-download-links-pse-premiere-pre.htm l
    and activate with your serial number.
    if you have a problem downloading, you didn't follow all 7 steps, or your browser does not accept cookies. 
    the most common problem is caused by failing to meticulously follow steps 1,2 and/or 3 (which adds a cookie to your system enabling you to download the correct version from adobe.com). 
    failure to obtain that cookie results in an error page being displayed after clicking a link on prodesigntools.com

  • I need to know how to reload Family Base to my daughter's phone... she deleted it...  :-\

    I need to know how to reload Family Base to my daughter's phone... she deleted it....
    Any ideas would be appreciated!!

        We'll make sure to walk you through the steps and get FamilyBase reloaded to her device SStone63! What phone make/model does she have?
    AshleyS_VZW
    Follow us on Twitter @VZWSupport

  • After updating iOS 8 magazine in news stand tells me to restart to download magazines. How do you restart or reload newsstand?

    Magazine in newsstand tell me to restart and the download again. How do you restart or reload newsstand?

    Hey miriamfromrockport,
    Thanks for the question. After reviewing your post, it sounds like trouble with newsstand. Is it one magazine giving this error or many magazines? I would recommend that you read these articles, they may be able to help you resolve or isolate the issue.
    Turn your iOS device off and on (restart) and reset
    Use iTunes to restore your iOS device to factory settings
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • Everytime I try to open a creative cloud product, the program closes. I need to use both illustrator and indesign for school and I was wondering if anyone had any advice on how to actually make the program work?

    If anyone has any advice on how to make creative cloud programs work please let me know!
    Any help is appreciated.

    These questions below may be for a different product... but the KIND of information you need to supply is the same, for the products you use
    More information needed for someone to help... please click below and provide the requested information
    -Premiere Pro Video Editing Information FAQ http://forums.adobe.com/message/4200840

  • I forgot my restrictions passcode for my ipad. under settings i went to "erase all content and settings" but it needs the passcode. how do i restart my ipad so it can go back to normal? i dont care about losing everything on it

    i forgot my restrictions passcode for my ipad. under settings i went to "erase all content and settings" but it needs the passcode. how do i restart my ipad so it can go back to normal? i dont care about losing everything on it

    Try and force the iPad Recovery Mode
    1. Disconnect the USB cable from the device, but leave the other end of the cable connected to your computer's USB port.
    2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off.
    3.While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.
    4. Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears, release the Home button. iTunes should alert you that it has detected a device in recovery mode. Click OK, and then click Restore to restore the device.
    Note: Data will be lost. You may have to repeat the above many times.

  • I need to send my macbook pro in for servicing. Can help instruct how to reload my creative suite master collection that I bought online?

    I need to send my macbook pro in for servicing. Can help instruct how to reload my creative suite master collection that I bought online?

    Download CS6 products
    Mylenium

  • Advice Needed - Sports Highlight Video - How to Combine Projects?

    I am trying to create a Soccer Highlight Video of my daughter.  The purpose is to be able to showcase her skills in a video and hopefully generate interest from collegiate coaches.  I have recorded video of multiple games which are each about 80 minutes long.  I am guessing I average about roughly 2 minutes of submittable footage from each game.  Once the final video is complete, it will be posted on you tube and the link will be sent out to the appropriate college coaches.
    I am currently working with each game separately as an individual project.  Once I have all the games editted, I would like to combine all of these individual game projects into one big project.  Once combined, I will then want to cut out a good portion of the game clips and just keep the really good stuff for the final product.
    My biggest question is in regard to bringing each small project together for the final project.  Can I "publish" each project and then import the "published" product into Permier Elements 11?  Is there an easy method?
    Any advice on how to easily do this would be very much appreciated.
    (I am using Premier Elements 11 (trial version) and AVCHD video files taken with a standard video camera.  If I can get this figured out I will definitly be purchasing the software.)

    The smartest way to work would be to set the Work Area Bar in each project so that you only output the segments of your videos you're going to use in your compilation. This will save you a lot of editing later as well as save you having to work with big, whopping files that you're only using short segments from.
    The best way to do this depends on how you're going to publish your finished video. Is it going onto a DVD? BluRay? YouTube or other online site? Video for a portable device, like an iPad?
    Each has its own best workflow.

  • Need advice on how to store and retrieve mathematical symbols - Oracle8i

    I am a student developing a web database for a P3 project and am having trouble inserting non-standard text particularly mathematical sybols (intergrals and the like) or Gifs/Jpegs. Could anybody give me some advice on how this should be done? I am using PHP, Oracle8i and Solaris.
    Cheers Pete

    >1. I have all of my RAW files on my Mac's desktop and they are organized at the top level by each of the 2 cameras they were taken with and then the sub folders of each organized chronologically with each subfolder titled by the location or subject of the images matter within each folder.
    >I want to import these into Lightroom 2.3 in a manner which will preserve this taxonomy.
    >I also want to convert these RAW images into DNG files on import. How do I set up LR2 to do this?
    On the Import Photos Screen, pick "Copy photos as Digital Negative(DNG) and add to catalog" from File Handling drop-down at top of screen.
    If your photos are organised as:
    Photos - Camera 1 ...
    - Camera 2 ...
    then Lightroom will reflect that folder view in its Folders panel. Also, when converting to DNG you get to choose destination folder (answers part of your question 2) and multiple organisation choices including "Organize by Original Folder"
    (Take a look at Chapter 4 of the help file for more information: http://help.adobe.com/en_US/Lightroom/2.0/lightroom_2_help.pdf)
    2. I want the Lightoom files and the image files....
    Create your catalog on that drive. Move your images to that drive before importing them, and when converting to DNG on import, choose a folder on that drive as destination on import screen.
    >Is RAID 1 as safe as backing up to 2 different HD's?
    No. RAID 1 is a simple mirror of 1 drive on another; so if you delete a file on drive, it is also deleted from both drives. Likewise, if a file is corrupted on one drive it will also be corrupted on the mirror. RAID 1 is good as a safeguard against single-drive failure; your data will be available from the remaining drive, but it is not a safeguard against user error or file corruption.

  • How can i stop tabs currently not being viewed from needing to be reloaded when i switch to it?

    When I am viewing a website in firefox mobile, if I open a link in a new tab, switch to this link, and stay on that tab for more than a minute, the first tab has to be reloaded when I switch back to it. Is there any way to increase the amount of time before a tab would need to be reloaded?

    Click twice to get the blinking cursor.

  • Need Advice on How To / Recommended App. for Custom "Word of the Day" Screensaver

    I really like the “Word of the Day” screensaver that comes with OS X 10.8 Mountain Lion.  I would like to either 1.) customize this screensaver with my own dictionary OR 2.) identify an app that I could purchase / download which would allow me to create my own custom “Word of the Day” screensaver. 
    Does anyone have advice on how I can create a custom “Word of the Day” screensaver using my own dictionary?
    Any advise would be greatly appreciated!

    Thank you!
    If you have time for just a couple more questions.  The ultimate goal is have my new flash files in a version (as3) so they can be used as android, html5 and iOs products.
    So would the steps be these?
    Install cs6
    Open SWF files that were created in as2
    (I am assuming by doing this, all the assets will end up in the library which is currently not happening when I import the swf files into Flash CC)
    So now I have the old swf files open in a version of flash that works in as2.
    I understand that as2 is not fully convertible to as3.  But assuming I want to use the assets (graphics and audio) to recreate the animations in as3 can I then save the as2 file as as3 so it would then work with AIR?
    Thanks again?

  • Mac security and maintenance advice needed.

    can someone please advice me how to keep my mac secured and well maintained. i mean the macbook hardware as well as software.
    any antispyware or antivirus i should get for mac? would u recommend one? and which one? also suggest me some free alternatives.
    on pcs putting realtime scanners would slow down the system. i hope thats not the case in mac.
    also, any maintenance software like a defragmenter? i have been told macs dont need a defrag program. recently a whole lot of permissions went bad when i did a 'verify permissions' check.
    also, can someone tell me how often one should calibrate the battery?

    Kappy's Personal Suggestions for OS X Maintenance
    For disk repairs use Disk Utility. For situations DU cannot handle the best third-party utilities are: Disk Warrior; DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible. TechTool Pro provides additional repair options including file repair and recovery, system diagnostics, and disk defragmentation. TechTool Pro 4.5.1 or higher are Intel Mac compatible; Drive Genius is similar to TechTool Pro in terms of the various repair services provided. Versions 1.5.1 or later are Intel Mac compatible.
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep. Dependence upon third-party utilities to run the periodic maintenance scripts had been significantly reduced in Tiger and Leopard.
    OS X automatically defrags files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive. As for virus protection there are few if any such animals affecting OS X. You can protect the computer easily using the freeware Open Source virus protection software ClamXAV. Personally I would avoid most commercial anti-virus software because of their potential for causing problems.
    I would also recommend downloading the shareware utility TinkerTool System that you can use for periodic maintenance such as removing old logfiles and archives, clearing caches, etc.
    For emergency repairs install the freeware utility Applejack. If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the commandline. Note that presently AppleJack is not compatible with Leopard.
    When you install any new system software or updates be sure to repair the hard drive and permissions beforehand. I also recommend booting into safe mode before doing system software updates.
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    1. Retrospect Desktop (Commercial - not yet universal binary)
    2. Synchronize! Pro X (Commercial)
    3. Synk (Backup, Standard, or Pro)
    4. Deja Vu (Shareware)
    5. Carbon Copy Cloner (Donationware)
    6. SuperDuper! (Commercial)
    7. Intego Personal Backup (Commercial)
    8. Data Backup (Commercial)
    The following utilities can also be used for backup, but cannot create bootable clones:
    1. Backup (requires a .Mac account with Apple both to get the software and to use it.)
    2. Toast
    3. Impression
    4. arRSync
    Apple's Backup is a full backup tool capable of also backing up across multiple media such as CD/DVD. However, it cannot create bootable backups. It is primarily an "archiving" utility as are the other two.
    Impression and Toast are disk image based backups, only. Particularly useful if you need to backup to CD/DVD across multiple media.
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore.
    Additional suggestions will be found in Mac Maintenance Quick Assist.
    Referenced software can be found at www.versiontracker.com and www.macupdate.com.
    Do You Need Anti-Virus Protection for Your Mac?
    According to Rich Mogull's article, Should Mac Users Run Antivirus Software?,
    "The reality is that today the Mac platform is relatively safe. There are hundreds of thousands of viruses and other malicious software programs floating around for Windows, but less than 200 are known to target the Mac, and many of those are aimed at versions of the Mac OS prior to Mac OS X (and thus have no effect on a modern Mac).
    It's not that Mac OS X is inherently more secure against viruses than current versions of Windows (although it was clearly more secure than Windows prior to XP SP2); the numerous vulnerabilities reported and patched in recent years are just as exploitable as their Windows equivalents. But most security experts agree that malicious software these days is driven by financial incentives, and it's far more profitable to target the most dominant platform."
    Mr. Mogull is a computer security expert. I recommend reading the entire article as it is quite informative.
    For additional information on viruses, trojans, and spyware visit The XLab FAQs and read the FAQs on viruses and spyware.
    About Batteries in Modern Apple Laptops
    Apple - Batteries - Notebooks
    Extending the Life of Your Laptop Battery
    Apple - Batteries
    Determining Battery Cycle Count
    Calibrating your computer's battery for best performance
    Battery University
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger and Leopard.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer. Now restart normally.
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger, and 4.1 for Leopard) and/or TechTool Pro (4.6.1 for Leopard) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    would keeping the charger plugged in extend battery life?
    It will neither hurt nor improve battery life. The life of the battery is determined by the number of full charge cycles - about 500 is the average life. If you use the computer mostly in a location with access to an AC outlet then you should use the AC adapter rather than run on the battery.

Maybe you are looking for

  • Converted MS Word 2007 to Adobe Acrobat 9 random "Bad Parameter" Error

    Question: I Converted MS Word 2007 file which contained 892 pages into Adobe Acrobat 9 Standard afterwards and while needing to update only certain pages I receive the "Bad Parameter" Error. My process is using drop down Document/Extract pages(make m

  • While installing Adobe Premiere Elements 10 for Mac my installation encountered errors.

    While installing Adobe Premiere Elements 10 for Mac my installation encountered errors. Got about 42% and then crashed with an Exit error Code 7. The summary says: DW036: Payload cannot be installed due to dependent operation failure. I have screengr

  • Architecture for multi hardware control

    Hi I am designing a optical multi board control system which includes a Laser source, a Polorization Control module and a Polorimeter, the 3 modules are dependent with each other. I think we only need to understand the hardware are 3 different module

  • Http Status 404 error

    Hi, I Created a web appln which includes a simple html pg and a servlet using tomcat as WS.I am able to access the Html pg only if i deploy it in the webapps->proj name folder.but when i deploy the servlet pg and the Deploydesc in the WEB-INF in put

  • I have balance but cannot buy anything

    I HAVE A BALANCE BUT CANNOT BUY ON ITUNES STORE