Questions tagged [delegation]

A delegate is a type that references a method

A delegate is a type that references a method. Once a delegate is assigned a method, it behaves exactly like that method. The delegate method can be used like any other method, with parameters and a return value

761 questions
0
votes
1 answer

Am I creating a retain cycle between UIViewController and a custom object?

In a project using ARC, I have a UIViewController that is handling too many concerns, so I'm looking to split things up. One obvious thing for me to take out is a method that formats and sends an email, and split that into a separate object. My…
Mattio
  • 2,014
  • 3
  • 24
  • 37
0
votes
1 answer

iOS: Changing UIButton Title through Delegate

I'm using delegation to change the title of a UIButton. .h MainView //MainViewController.h #import @class SignUpDelegate; @protocol SignUpDelegate @required -(void)loggedIn; @end @interface MainViewController :…
user1107173
  • 10,334
  • 16
  • 72
  • 117
0
votes
3 answers

Cannot find protocol declaration for "XXXX"

I am stuck with this problem. I have the following .h file: #import @protocol MapSettingsViewDelegate - (void)settingsDidUpdate:(BOOL)scheme; @end @interface MapSettingsViewController : UIViewController @property (nonatomic,…
Eduardo Mauro
  • 1,515
  • 1
  • 26
  • 38
0
votes
3 answers

set up models to have a unique id attribute value among corresponding tables

I'm new to rails and I'm facing a problem with how to set up my models. I've got a set of models: Balloon, Paint, Brush etc. They have common attributes (like "name") I want them to have a unique id. That is I want that if there is an instance of…
Andrew
  • 2,148
  • 5
  • 23
  • 34
0
votes
2 answers

How do I reduce delegation boilerplate?

I have a class that implements an interface. There's another class that implements this interface, too, and an instance of this second class backs my class's implementation. For many of the methods specified by the interface, my class simply…
Maxpm
  • 24,113
  • 33
  • 111
  • 170
0
votes
1 answer

Delegate protocol/IBOutlet

I basically have a subclass (RRView) of UIView with a delegate protocol. The RRViews are connected via outlets to the view controller which implements the delegate protocol as well as the delegates. The code where I ask the delegate for additional…
Bernd Rabe
  • 790
  • 6
  • 23
0
votes
3 answers

Delegation not working properly (should tell a VC to popViewControllerAnimated)

I am using a simple protocol to tell a delegate when save button was tapped on VC2 so the view controller can be dismissed by popViewControllerAnimated by VC1. VC2 has a protocol which VC1 confirms to. VC2.h #import @class…
user1010563
0
votes
1 answer

Trying to dismiss a view controller by tap on cancel using delegation (Not working at all)

Having two view controller within a navigation controller: PhoneNumbersTVC > holds a list of phone numbers added by NewPhoneNumberTVC NewPhoneNumberTVC > a controller for adding phone numbers When I tap on cancel on NewPhoneNumberTVC I like to get…
user1010563
0
votes
1 answer

How to configure a system-wide package in osgi?

I need to made available a library to some bundles. This library makes use of RMI, so it needs (as far as I know, at least) to use the system class loader in order to work (I tried to "osgi-fy" the library, which results in classcastexceptions at…
cheng81
  • 2,434
  • 2
  • 21
  • 18
0
votes
2 answers

Drawing in segue vs writing code to transition views - why does data sometimes not transfer?

Let's say I have a UILabel on ViewControllerA and and UITextField on ViewControllerB. I want to go to ViewControllerB and input text then press a button to go back to ViewControllerA. The UILabel should now read whatever was typed in the…
iOSAppGuy
  • 633
  • 7
  • 23
0
votes
2 answers

Trouble coordinating view controllers

I have the following view controllers built in my app. The presenting controller is "PatientSelectViewController" (let's call it controller A) and it allows to either manually enter the patient ID in a text field or press a "Scan Barcode" button …
PeterD
  • 642
  • 1
  • 6
  • 17
0
votes
5 answers

Delegation, some example of code? How object delegate to other

I would like to gain a better understanding about the delegation. Can somebody please paste a good code sample of delegation and explain how it works?
Jan
  • 61
  • 1
  • 2
0
votes
1 answer

ADFS delegation with SAML 2.0 delegation tokens

I have managed to configure ADFS 2.0 as a SAML 2.0 Idp and implement a SSO scenario with Shibboleth as a SAML 2.0 SP. Now I want to implement a delegation scenario in which ADFS will act as an Idp that issues SAML 2.0 delegation tokens for non WIF…
0
votes
1 answer

C++ 11 Delegate Constructor With New Instance Parameter?

Having an issue getting this syntax to compile using the Visual Studio Nov 2012 CTP C++ Compiler ... Just wanted to be sure I wasn't missing something obvious. Thanks! EDIT: Removed Header to make it even simpler. class Location { public: …
e.s. kohen
  • 213
  • 1
  • 4
  • 21
0
votes
2 answers

Popping ViewControllers when using delegation

I'm a bit weak in my Objective C I'll admit, my ultimate goal is pass data from ViewController3 back to ViewController1. Actually, that part is already done and successful. However when calling [self.navigationController…
xhermit
  • 501
  • 1
  • 7
  • 19