Note that there are some explanatory texts on larger screens.

plurals
  1. UScduhn
    primarykey
    data
    text
    plurals
    1. COIt sounds like you're getting it figured out. Delegating your viewWill/DidAppear/Disappear methods is necessary when you're using nested sub-controllers like this. Apple's view controller framework is only designed to support one controller per screen, but you can get away with nesting them if you delegate these methods. DO NOT call dealloc directly though. It will get called automatically when the reference count on your object goes to zero. If dealloc is never getting called, you may have a circular reference somewhere. Make sure your objects aren't mutually retaining each other.
      singulars
    2. COOne weird thing about your `makeRoundCornerImage:::withBorder:` method is that it returns a retained object when `border` is `YES`, and an autoreleased object when `border` is NO. In this case you're passing YES, so I would expect this to leak memory, but that doesn't explain why NSZombieEnabled is complaining.
      singulars
    3. COTo help narrow it down, set a breakpoint on your call to setBackgroundImage:forState: Then at your gdb prompt in your console, execute "po scaledImage", "po roundedImage", "po imageFromFile", and "po [object imageAttribute]". It will output a description of each object, including its hex memory address (e.g. 0x3b1d600). Then hit continue and look at the object address that's giving you an error from NSZombieEnabled to identify which object is receiving the message after it's been deallocated.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload