Question about Delegate and Target-Action Patterns


I’m a bit stuck on working the connections out properly for the Silver Challenge.

  1. When looking at a project in XCode, how can I recognize a Delegate vs Target-Action relationship?

  2. Where does the idea of an “outlet” fit in with “Delegate” and “Target-Action”?

  3. For the Whereami project, is the connection from the WhereamiViewController object to the UIActivityMonitorView object a Delegate kind of connection, Target-Action kind of connection, or something else?

  4. For the Whereami project, I never typed anything like setDelegate for either MKMapView or UITextField. I think that is because the WhereamiViewController is identified as the delegate somewhere in the XIB file as a result of the click-drag steps I did in the interface builder, is that correct?

  5. I ask the question above, because the API for UISegmentedControl prominently showcases the message addTarget: action: forControlEvents: … but I’m not seeing a need to type this anywhere if I’ve made the connections using interface builder. Am I thinking about this correctly?