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
3 answers

Setting delegate in "unrelated" class

I am having trouble using a protocol to get some data from another class. I can't see how to set the delegate in a class that doesn't segue to the MVC that needs the data. I create the protocol in the MVC and implement the method(s) in some…
Bob
  • 559
  • 1
  • 5
  • 18
0
votes
1 answer

Change a font from a popover for underling scrollview

I am using Xcode 4.5, targeting iOS5 and above. I have a popover that allows a user to change the fonts of the underlying view. When tapping on the font, the change does not occur, until after I close the popover and the underling view and…
Marc Watson
  • 255
  • 3
  • 16
0
votes
2 answers

Are multiple elements each with an addEventListener allowed?

I would like the specified function to be called only if the correct button is clicked on. function callback(func){ func(); } The main function(s) and their results: Attempt A: document.addEventListener('DOMContentLoaded', function ()…
cateye
  • 47
  • 1
  • 9
0
votes
1 answer

delegate not getting nil

I am working on a project in which I perform lazy loading of images. When the imagedownloader downloads the images,it sends the message to its delegate to handle the image. But when its delegate,which is a view controller, gets deallocated from…
Vishal Singh
  • 4,400
  • 4
  • 27
  • 43
0
votes
1 answer

Implementing WIF ActAs Scenario: The identity check failed for the outgoing message

So I'm trying to consume a WCF service from a website and pass the IClaimsIdentity the site got from an STS through to the service. When I try to invoke a service method through an ActAs channel, I get the following error on the client (looking at…
Veli Gebrev
  • 2,481
  • 4
  • 31
  • 48
0
votes
0 answers

Where should I delegate this UITableView to?

I'm building a scrollable grid layout in iOS. The hierarchy is as follows: (MyController) UITableViewController - Parent Table View (UITableView) - "Horizontal cell" (UITableViewCell) - Sub Table View (UITableView) - Sub table…
bodacious
  • 6,608
  • 9
  • 45
  • 74
0
votes
1 answer

Spring Security Delegating Authentication to CAS

I was looking through the questions between CAS and Spring Security, but I have not found the exact situation for this. My question is in regards with Setting up Spring Security to have it's users based off CAS. Currently, we are modifying CAS to…
KSGB
  • 1
  • 3
0
votes
2 answers

Scroll to top does no work

Hello I am new to jQuery and I have a problem! I want to scroll to the top, in a page that is loaded via AJAX call. This works (test): $(document).on('click', '#top_icon', function() { alert('ok'); }); But this is not working (this is what I…
kapantzak
  • 11,610
  • 4
  • 39
  • 61
0
votes
1 answer

Ignore child elements using jQuery event delegation

I am using the on method to delegate a click event to injected divs. These injected divs will have child divs as well that are positioned outside of their parent div. I am looking to ignore the click event on the child divs but can't seem to figure…
Randy Gonzalez
  • 445
  • 5
  • 17
0
votes
1 answer

Communication between controllers iOS

first of all I want to show you my storyboard: I have a Label in the CUVCViewController (the first view of the left) and a UISlider in the CUVCViewControllerPageTwo (the second view). When I tap on the "page 2" button I can change the value of the…
0
votes
1 answer

Delegate not being set

Could someone please help me with the following code: - (IBAction)addCellButton: (UIBarButtonItem *)sender { if(!self.imagePopover) { AlbumPicker *albumPicker = [self.storyboard…
Nate Mann
  • 695
  • 6
  • 17
0
votes
3 answers

Can I target a delegate to a "specific" instance of a ViewController, to get it's data?

How can I do this? I have ViewController 1, and ViewController 2. ViewController 1 defines a protocol and ViewController 2 conforms to it. I set ViewController 2 has a delegate and invoke a method in ViewController 1. This method runs fine. And send…
nmdias
  • 3,888
  • 5
  • 36
  • 59
0
votes
2 answers

GCD and delegation on which thread?

I am trying to figure out if this code is updating the UI on the main thread. This code is in a class I made specifically for downloading the JSON feed. After getting the data, I parse it to return an array I will use to update the UI, and then let…
James Kuang
  • 10,710
  • 4
  • 28
  • 38
0
votes
1 answer

WCF Impersonation doubts

What impersonation level is required when implementing a service that needs to access out-of-process resources on behalf of the original caller? According to MSDN Impersonation: The server process can impersonate the client's security context…
user27839
  • 25
  • 4
0
votes
1 answer

Is there a way to be notified when a view controller load a new view controller modally?

I need to be notified about modal view controller presentation, I know that I can do using NSNotificationCenter posting and observing my custom notifications, but I'd like to know if these kind of notification already exist. Thanks, Andrea
Andrea
  • 26,120
  • 10
  • 85
  • 131