The internal workings implicitly popping from Navigation Controller

I'm just curious to how a Navigation Controller is working when you pop out from a child view to a parent view. The reason I'm asking is because I have this kind of set up:
App Delegate:
Creates Nav Controller and inits it with a Root View
Root View:
Just some table view that allows to drill down a row to "Second View" lets call it
When I push the second view into the Nav's stack, it'll automatically create a back button to pop. I am noticing when I hit back, it displays the Root View but the view event methods, i.e. viewWillAppear, are not called. Why is this?
Since this is the case, what is the best way for me to reload the table view's data when I do a pop?

Hey Ray,
Sorry for all the confusion previously. I didn't have my personal computer at work so I wasn't able to copy/paste the exact code snippets but I can assure you that my print logs are working correctly. I actually have figured out what my issue was and I'll present to you (and anyone else who have run into a similar problem) what my problem was and what I did to solve it.
First of all, let me address your previous questions. I am creating my Nav controller and the root view in the app delegate via the applicationDidFinishLaunching method. So something like this:
myViewController *vc = [[myViewController alloc] initWithNibName@"myViewController" bundle:nil];
myNavController = [[UINavigationController alloc] initWithRootViewController:myViewController];
This was not the issue. The issue stems from the design of my app.
The *root view controller* is actually a view that acts as a *container for two other view controllers*. One of them a *UITableViewController that controls a UITableView*, and the other is a *UIViewController that controls a MKMapView*.
The UITableView has the ability to drill down into another table view, which invokes some actions that updates the list from the first view. This all works fine as I'm seeing in my logs.
The problem was when I pop back to the root view I don't see the list updated; this pop back I'm referring to is the "Back" UIBarButtonItem that gets prefabbed for me when I push something to the Nav controller's stack. From my logs, the UITableViewController's inherited method, viewWillAppear is not being invoked, therefore, the [self.tableView reloadData]; that I placed in there is not being called.
For some reason, a light bulb went on in my head today to investigate the container's view controller! *What I found out was only the container view controller's view event methods was getting called*; so all the viewWillAppear, viewDidAppear, etc... that I did not previously implement wasn't getting called and not appearing in the logs.
So now, in the container's view controller's viewWillAppear, I call the UITableViewController's viewWillAppear, and my UITableView's list gets updated. So it's all working perfectly now.
Thanks!

Similar Messages

  • Problem responding to view being popped from navigation controller

    I have a detail view controller which is pushed onto the application's navigation controller stack by a given parent controller. The user is able to select table values in the detail controller, which should update the parent controller when, and only when, the detail view is popped and the parent view is made visible again.
    Is there a way to do this? I couldn't see any appropriate methods in UIViewController which would be called when the child view is popped. I've tried to make the parent controller conform the UINavigationControllerDelegate protocol and provided an implementation for willShowViewController method, but this method doesn't seem to get called when the view is displayed.
    I'm not sure if I'm going about it the right way trying to implement the UINavigationControllerDelegate and there is a bug with my implementation, or there are better ways to go to implement this functionality, such as using a modal controller, etc.

    m_userName wrote:
    The user is able to select table values in the detail controller, which should update the parent controller when, and only when, the detail view is popped and the parent view is made visible again.
    I don't understand why you require the update to be made only when the detail controller is popped, since during the time the detail controller is on top of the stack, the controller underneath isn't visible. It's common practice to pass data to the previous controller any time before the top controller is popped. Note that there's only a short interval between the time the top controller is removed from the stack and the time it's deallocated (unless you've retained that controller elsewhere, which should be avoided for best memory management).
    That said, [viewDidDisappear:|http://developer.apple.com/library/ios/documentation/UIKit/R eference/UIViewControllerClass/Reference/Reference.html#//appleref/doc/uid/TP40006926-CH3-SW20] is called during that interval, so I think it would be a good choice for the requirement you described:
    - (void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
    if (self.navigationController == nil) {
    NSLog(@"%s: *POPPED* level=%d", _func_, level);
    // pass the data here
    The test for a nil navigationController pointer tells us whether the controller is actually off the stack when viewDidDisappear: runs. This is useful in case an instance of this controller class ever pushes another controller on top of it, since viewDidDisappear: will run in that situation as well. But in that case the controller doing the pushing remains on the stack, so its navigationController property won't be nil. If that property is nil when viewDidDisappear: runs, we know self has just been popped.
    You can also find the above example in [Problem with text in detailTextLabel of UITableViewCell |http://discussions.apple.com/message.jspa?messageID=12495708#12495708], so if you build the code in that thread you can see how things work together.
    - Ray

  • HT1948 Does the macbook use the internal harddrive when booting from usb and when fully booted?

    I wonder if the Macbook Air uses the internal SSD drive when booting Mac OSX lion 10.8.2 from a bootable USB stick?
    I am suspecting the internal harddrive is faulty because it gives me random system freeze ups during normal use, making me hold the power button to shut it down. So I'm wondering if I boot my macbook from a bootable USB, if the internal drive is used for caching or anything?

    What i'm doing when it freezes is totally random. I am not having any programs open, but for example just clicking on the apple icon or starting up safari, there seems to be no specific program that crashes it. I'm still running without a freeze up after I fixed the drive permissions with Disk Utility. But here is Etrecheck;
    Hardware Information:
    MacBook Air - model: MacBookAir2,1
    1 1.86 GHz Intel Core 2 Duo CPU: 2 cores
    2 GB RAM
    System Software:
    OS X 10.8.2 (12C60) - Uptime: 0 days 0:9
    Disk Information:
    APPLE SSD SM128 disk0 : (121,33 GB)
    disk0s1 (disk0s1) <not mounted>: 209,7 MB
    MacBook Air (disk0s2) /: 120,47 GB (106,36 GB free)
    Recovery HD (disk0s3) <not mounted>: 650 MB
    USB Information:
    Apple Inc. Built-in iSight
    Apple Inc. Apple Internal Keyboard / Trackpad
    Apple Computer, Inc. IR Receiver
    Apple Inc. BRCM2046 Hub
    Apple Inc. Bluetooth USB Host Controller
    FireWire Information:
    Kernel Extensions:
    Problem System Launch Daemons:
    Problem System Launch Agents:
           [failed] com.apple.afpstat.plist
           [failed] com.apple.mrt.uiagent.plist
    Launch Daemons:
       [not loaded] com.bjango.istatmenusdaemon.plist
    Launch Agents:
           [loaded] com.bjango.istatmenusagent.plist
    User Launch Agents:
    User Login Items:
    iTunesHelper
    3rd Party Preference Panes:
    None
    Internet Plug-ins:
    JavaAppletPlugin.plugin
    QuickTime Plugin.plugin
    User Internet Plug-ins:
    Bad Fonts:
    None
    Top Processes:

  • Why does the bookmark button keeps moving from navigation to bookmark toolbar when I don't put it there; how to solve this?

    Because my screen isn't that big, I want my bookmark-toolbar-items (the item for the special bookmarks folder) to take all width, and I want the bookmarks button on the navigation toolbar (because I don't need such a long url field).
    As you can edit the toolbars and their buttons, I did change it to what I want, but whenever saving & closing the edit-window the bookmarks button (with the drop-down menu) moves down one toolbar automatically. This is very, very annoying, not the least because in the editing mode it is ok (it also is saved correctly).
    Any way to overcome this problem?

    When the Bookmarks Toolbar is displayed, the Bookmarks button automatically moves from the Navigation Toolbar to the Bookmarks Toolbar. This is intended behavior. I can't tell you ''why'' though, as it doesn't make any sense to me either and I likely find it twice as annoying as you do.
    Install the following extension.
    * [https://addons.mozilla.org/firefox/addon/bug582139/ Allow full customize bookmarks button]

  • Keyboard not resigning the second time i pop a view controller

    i am developing an app that involves 2 tableViewcontroller. when a cell is selected in a tableViewController the detail table view is shown. the detail table view has a cell with a textfield in it.The value entered in the textfield is send to a webservice and the response is alerted using alertView. When the ok button is pressed in the alert view the viewcontroller is poped from navigationcontroller. the keyboard is hidden using the code
    - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
    [self.currentResponder resignFirstResponder];
    this is working fine the first time i push the viewcontroller and pop it. The keyboard is hiding. but the second time i push the same view controller and then pop the viewcontroller the keyboard is not hiding... can anyone tell me where i have went wrong..?

    I checked the code, we do not have any other manipulation on the view object, the only thing different in our case that I can think of is that this code is being called the 1st time from one page in the afterPhase method of a class that implements PagePhaseListener (on page load). I'm passing the page name to the View Object, and this invokation executes okay an returns the matching one record.
    Then I navigate to another page (again in its page definition, its controller is using the same pagePhaseListener class), so when the code is executed the next time, I'm passing the new page name, but this invokation does not return any data, even though I'm sure the SQL and the page name parameter does return 1 row in SQLPlus.
    Any thing special with executing the view object parameter binding when I navigate out and back to the page?
    Appreciate the help
    Mohamed

  • BP_CONT: not getting the contact person email value from custom controller

    Hi Experts
    not able to find the email address in any of the context node, actually my requirement is while creating the BP contact , get the email address  BP_ADDR/StandardAddress STRUCT.E_MAILSMT . take this email id and check whether this email id exists in system if exists throw the error while saving . for this I did the codin in BP_CONT component on save method but while saving some times my custom controller is getting initiated some times it was not containing any value , kindly let me know how can I get the email value of contact person in BP_CONT  component in view BPCONTOverview .
    here is my code on method eh_onsave
    lr_curo_bpcont_custcntrlr ?= me->get_custom_controller( controller_id = 'BP_CONT/BPCont' ).
      IF  lr_curo_bpcont_custcntrlr IS BOUND.
        TRY.
            lr_entity_privstdaddr ?= lr_curo_bpcont_custcntrlr->typed_context->privstdaddr->collection_wrapper->get_current( ).
            lv_privstdaddr_e_mailsmt = lr_entity_privstdaddr->get_property_as_string('E_MAILSMT'). " Get runtime email value of contact person
            lr_entity_bpcategory ?= lr_curo_bpcont_custcntrlr->typed_context->builheader->collection_wrapper->get_current( ).
            lv_partner_category = lr_entity_bpcategory->get_property_as_string('BP_CATEGORY'). " Get Partner Category value
          CATCH cx_sy_ref_is_initial cx_sy_move_cast_error cx_crm_genil_model_error.
        ENDTRY.
      ENDIF.
    here the problem is some times I'm getting the value and some times I'm not getting value the related objects also through get related entities contact person emial is not getting populated any where
    kindly help what is going wrong
    Thanks & Regards
    Rajasekhar

    Hello Rajasekhar,
    Could you please share how you resolved this issue? I have the exact same requirement (duplicate check based on email).
    Kind regards

  • The internal speakers have popped, what should I do?

    I had missed 8 calls today, and than on the ninth call the sound of the ringtone sounded strange.  I played several songs, than realized that the speakers have popped. They play in this low volume scratchy sound.  Is this repairable, and is it worth it?

    First, there's only one speaker on the iPhone.
    If your phone is under warranty still, it will be replaced. Just bring it into the Apple store.  If not still under warranty, you can get an out of warranty exchange for 199.00 USD.

  • How to get the first and second quarter from CRT

    Dear Freinds,
                    I have one scenario , the Functional SPEC says Read the payroll results and from the CRT  get all the 4 quaters
    for the wage type /5UH  and sum them and then pass on the to field in the main strucutre.
    Iam using the FM HR_GET_PAYROLL_RESULTS
      CALL FUNCTION 'HR_GET_PAYROLL_RESULTS'
        EXPORTING
          pernr                         = fp_v_pernr
          permo                         = fp_v_permo
          pabrj                         = fp_v_pabrj
          pabrp                         = fp_v_pabrp
          actual                        = 'A'
        TABLES
          result_tab                    = i_payresult
        EXCEPTIONS
          no_results                    = 1
          error_in_currency_conversion  = 2
          t500l_entry_not_found         = 3
          period_mismatch_error         = 4
          t549q_entry_not_found         = 5
          internal_error                = 6
          wrong_structure_of_result_tab = 7
          OTHERS                        = 8.
    Iam collecting all the Actual Result (current result) values
    on the selection screen iam passing for month april (04 2008)
    so this falls in the second quater .
    the internal table   i_payresult is picking up only the second quater (01-04-2008 to 30/04/2008 )  ,but since on the selection screen iam pasing as other period (04 2008) the internal table  i_payresult  returing from the FM  (HR_GET_PAYROLL_RESULTS) only   picks the second quater,
    could any one let meknow how i can pick up the first quarter as well and add the first and second quater to mee the requirement .
    Please help me in this regard
    Thanks & regards
    maduri

    Hi Manoj,
                 Thank you for giving me idea for going further  regarding this problem , so my final question for this is
    as per FS they said they are going to enter the payroll
    area and the other selection as 04 2008 
    In order to achieve the first quarter , because 04 2008 means they are going to enter for the second quarter , the payroll results will come only for second quarter and not for the first quater , if they want to sum all the two quarters then they shouldnt pass on the selection screen   the dates as 04 2008, instead they has to pas
    01 01 2008 to 30 06 2008 , as there is no point in they passing as 04 2008 as we are going to consider from 01 2008 to 062008 .   Please correst me if am correct regarding the dates passing on teh selection screen
    or if the user enters on theslection screen still enter 04 2008 and will be  able to acheive the first quarter ??
    Please answer me this point before i can change the logic of the code and tell to my FO regarding this point.
    thanks & regards
    Madhuri

  • Internal Workings of Deserialization

    I was wondering if anyone understood the internal workings of the ObjectInputStream class in respect to deserializing an object. By reading through the source code I was able to determine how the no-arg constructor of the first non-serializable superclass is called (via reflection). What is alluding me is how the appropriate sub-class is created without calling any constructor.
    Related to this question is the workings of the ReflectionFactory. When the no-arg constructor of the superclass is found a method call to ReflectionFactory, newConstructorForSerialization, is called and is passed the name of the class to be created and the no-arg constructor. The constructor that is returned is stored as the no-arg constructor. Should I believe that the no-arg constructor is somehow altered to produce a chain of specialized constructors that in turn create the appropriate subclass?
    Thanks for your time

    See if this helps you out:
    http://java.sun.com/j2se/1.4/docs/guide/serialization/spec/serialTOC.doc.html

  • How do I delete stored email addresses in my iphone? When sending photos, I don't want to have certain email addresses  "popping up" from the internal memory, I've deleted my entire "Contact" list but they still appear.  Help please!

    How do I delete stored email addresses in my iphone? When sending photos, I don't want to have certain email addresses  "popping up" from the internal memory, I've deleted my entire "Contact" list but they still appear.  Help please!

    As with the Mail app on a Mac, the iPhone's Mail app stores all email recipients in a list of previous recipients which is separate from the address book or contacts. The email address autofill feature when addressing an message pulls from Contacts and from the list of previous recipients.
    Different from the Mail app on a Mac, there is no access to the list of previous recipients with iOS on an iPhone, iPod Touch, or iPad to remove a previous recipient from the list, or to add a previous recipient to the address book or contacts that is not already entered - not at the present time anyway.
    The only way to purge the list of previous recipients at the present time is by restoring your iPhone with iTunes as a new iPhone or not from your iPhone's backup, which will start being re-populated again with every sent message.

  • GE70 2oc - low volume from both the internal and external microphone

    Hello,
    I have an MSI GE70 2OC and the following problem. The volume of the sound recorded from the internal microphone (as well as any plugged-in mic) is very low. Even when the mic is set to 100 and there is a boost of +30dB the sound quality is very poor, that is there's either a loud noise/static or a distorted sound (when the noise reduction is on).
    I have the latest audio driver installed (Realtek HD Audio, ver. 6.3.9600.16384).
    Is there a way to solve this problem?
    I'd be grateful for help!

    Hi ATASG,
    Here's the system info (the first section of the text file):
    System Information
    Serial Number:                FFFFFFFF
    Product Name:                 GE70 2OC
    OS:                           Microsoft Windows 8.1 64-bitowy
    Windows Product Key:          JQJJV
    HDI Build:                    non-OEM
    BIOS Version:                 E1757IMS.611
    BIOS Release Date:            2013/08/27
    EC Version:                   1757EMS1 Ver5.06, 07/30/2013
    CPU:                          Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
    Memory:                       16 GB @ 800 MHz
                                   - 8192 MB, DDR3-1600, 0420 MIF4D1D167HZ1J   
                                   - 8192 MB, DDR3-1600, 0793 GR1600S364L11/8G 
    Graphics:                     Intel(R) HD Graphics 4600, 1024 MB
    Graphics:                     NVIDIA GeForce GT 750M, 2048 MB
    VBIOS Version:                80.07.a2.00.07
    Drive:                        HDD, HGST HTS721010A9E630, 931,51 GB
    Network:                      Karta Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC
    Network:                      Killer e2200 Gigabit Ethernet Controller (NDIS 6.30)
    Network:                      Urządzenie Bluetooth (sieć osobista)
    I doubt that the system recovery would help since the problem existed from the very beginning.

  • How to move an iTunes library from the internal hard drive to another bootable disk.

             I got two Mac OS X installations on my i Mac system. One on the internal hard drive (320 Gb), that has been there since the iMac was bought 3 years ago, upgraded to Lion on 2 August. (call that INT) . I have a USB external drive, and recently bought a firewire Lacie external drive (2Tb), so to boot from there when I can, with hard drive space getting tight this year. I successfully installed another copy of Lion on LACIE.
             Then I went to work to transfer my iTunes library, which the media files were optioned to store on the USB drive. Intending to transfer both the music and video files, and the megadata ( playlists, ratings, playcounts ) I found the media files and the iTunes library file and the .xml document in my iTunes folder from INT. I made a new folder in the USB drive, and copied the contents from the old iTunes folder to that new folder. I re-started in LACIE, and found my empty iTunes folder. I copied over to the new iTunes folder, then opened iTunes. My eyes saw the music library to the same number of items, with the playlists etc showing.
            However, I tried to sync an iPod Nano, and a window came up saying 100 songs could not be copied to the iPod because they could not be found. After ejecting the iPod I tried to play a song from iTunes, and the screen filled with exclamation points. A small window came up, asking for a password to open "sparsebundle" and my name. I entered my password for the administrator's log-in and it said try again with the password. Without knowing what password to put in, I clicked Cancel, and got another small window asking to locate the file. Then clicked Cancel again, not knowing where to search. All the media folders were showing after quitting iTunes and opening Finder .
          I re-booted into INT, and opened iTunes. The library was still there. I synced my iPod again, ejected it, played 3 songs on the iPod, synced again, ejected it again, and opened the playlist "Recently Played". It showed up okay with no problems. So my iTunes library in INT is alright.
          Has anyone got any idea how to make the transfer into LACIE and get it running alright, or what went wrong with what I did ?
          In the meantime I will empty my LACIE iTunes library folder's contents to the trash, and securily empty the trash .

    Solved the issue without using the trash . I tried to consolidate the library in LACIE, then clicked on any exclamation-mark song and tried to locate the file. Repeating those steps 3 or 4 times cleared it up. That was confirmed when I synced the entire library on a iPod Classic, and showed up no problems after syncing the Nano.
         What went wrong was perhaps to fail to consolidate the library at first .

  • I have a power pc (g5) computer that I will soon be replacing with a current i5 or i7 mini. How do I transfer the Time Machine files from the internal hard drive on the G5 to an external drive that I will later use with the Mini?

    I have a Power PC G5 computer that I will soon be replacing with a current i5 or i7 Mini. How do I transfer the Time Machine files from the internal hard drive on the G5 to an external drive that I will later use with the Mini?

    Hi, likely the easiest is to just poll the drive & get something like this...
    Get MacScan...
    http://www.apple.com/downloads/macosx/networking_security/macscan.html
    http://eshop.macsales.com/item/NewerTech/U3NVSPATA/
    But if you have a good external drive already, just clone it.
    Get carbon copy cloner to make an exact copy of your old HD to the New one...
    http://www.bombich.com/software/ccc.html
    Or SuperDuper...
    http://www.shirt-pocket.com/SuperDuper/

  • Can I clone and transfer from the internal hard drive to an external hard drive ?

    I got an intel duo iMac, the machine is very good even if it is almost 3 years old. But with the internal hard drive having 320 Gb I am running out of hard drive space. I have looked into changing the internal hard drive but that involves having to send the machine away to have that done. So I was wondering if I could just transfer all the Mac OS X and all the applications and settings within three user accounts to say a 2 TB external hard drive, and boot from that, using cloning software.
                 Alternatively, is there a way to transfer the iPhoto and iMovie libraries to an external hard drive. That would free up space. I do not know how, if that is possible, although I have managed that with iTunes. My iMac is running Snow Leopard.
              Regards from John5801

    John,
    USB should be fine for general computer use, but media may add a little too much for the sustained rate that USB2 provides. In a previous career I did a lot of video editing. Firewire was much preferred in that task because of its stability at higher rates. I can see why the SuperDuper! people might suggest it.
    When I cloned the wife's iMac, I had replaced the HDD on the MacBook Pro with a USB pocket drive that I've kept the original MacBook's installation mounted on. I've booted directly to that external drive, so you should be okay if you can make the clone across the USB. When I cloned the wife's machine I booted the MacBook Pro with a fresh HDD in Firewire target mode and connected it as an external Firewire 800 drive. Firewire 800 is much faster, but you'll need the cable and everything to be right.
    Firewire has a better reputation among people running a lot of media from their drive. I would suggest that you try and get an external drive kit that can support both. I think your iMac supports both firewire 400 AND firewire 800 along with the 3 USB2 ports. I'm guessing based on my wife's 24" imac. The fastest would be the Firewire 800, but that standard is about to be pushed aside in both cases.
    Hope that helped.

  • My lap top wont import pictures from auto play. it keeps saying there is a file error and a device connected to the computer isnt working properly. i have tried going into the internal storage to copy and paste the pictures but this wont work either.

    my pictures from my i phone 4s wont import from auto play. a message keeps coming up saying there is an error and a device is not working properly. also i have tried going into the internal storage to copy and paste them but that wont work either. the page either stops responding or the picture simply dont copy. does any1 have any idea why this is happening. it has never happened before and only seems to be happening since i started using i cloud storage instead of synching my phone with the lap top.

    I have decided to dedicate this thread to the wonderful errors of Lion OSX. Each time I find a huge problem with Lion I will make note of it here.
    Today I discovered a new treasure of doggie poop in Lion. No Save As......
    I repeat. No Save As. In text editor I couldn't save the file with a new extension. I finally accomplished this oh so majorly difficult task (because we all know how difficult it should be to save a file with a new extension) by pressing duplicate and then saving a copy of the file with a new extension. Yet then I had to delete the first copy and send it to trash. And of course then I have to secure empty trash because if I have to do this the rest of my mac's life I will be taking up a quarter of percentage of space with duplicate files. So this is the real reason they got rid of Save As: so that it would garble up some extra GB on the ole hard disk.
    So about 20 minutes of my time were wasted while doing my homework and studying for an exam because I had to look up "how to save a file with a new extension in  mac Lion" and then wasted time sitting here and ranting on this forum until someone over at Apple wakes up from their OSX-coma.
    are you freaking kidding me Apple? I mean REALLY?!!!! who the heck designed this?!!! I want to know. I want his or her name and I want to sit down with them and have a long chat. and then I'd probably splash cold water on their face to wake them up.
    I am starting to believe that Apple is Satan.

Maybe you are looking for