OK, I'm running into a strange issue which leads me to ask the question - does any code run after viewDidAppear?
Here's some more info. I have a tableViewController (TVC) with custom cells. One of the cells has a button as an accessory. When this TVC loads, the backgroundColor for the button is set. Selecting the cell with the button presents a view controller with a color picker (CPVC). When the CPVC is being dismissed, it first runs a onDismissal
block (set in the TVC) for adjusting the color of the button in the TVC. So far the code is working well and the color of the button is set when the color picker view controller is dismissed.
The problem I'm finding is after the button's color gets set, for some reason it resets to the previous color after ~0.25 seconds. You can see the color selected in the color picker set, and then the button's color transitions to its previous color. I don't understand why this is happening. When I inspect local color variables in the debugger, all of them are updated to the new color and it's uncertain where the reference to the previous color still exists. I've plugged in NSLog
statements into the TVC's viewDidAppear
method and have verified that after the color picker is dismissed, the button's color is set to whatever the user selected by the end of the viewDidAppear
method. It's only afterwards the color changes. Just what is running after viewDidAppear
?