title: setting (custom) delegate runs into infinite loop
body: <p>Am trying to write a simple custom delegate for displaying multiple selection list (after referring various online tutorials, stackoverflow, Apple doc), but in the class that I want to use the delegate, the line where I set the delegate runs into an infinite loop when I run it.</p>
  
  <p>I have shared the source code here
  <a href="https://bitbucket.org/ikosmik/uilistviewcontroller/src/ddfcd140b52e6e59d84e58d34d601f8f850145a1/UIList?at=master" rel="nofollow">https://bitbucket.org/ikosmik/uilistviewcontroller/src/ddfcd140b52e6e59d84e58d34d601f8f850145a1/UIList?at=master</a></p>
  
  <p>UIListViewController (where am declaring the protocols)
  <a href="https://bitbucket.org/ikosmik/uilistviewcontroller/src/ddfcd140b52e6e59d84e58d34d601f8f850145a1/UIList/UIListViewController.h?at=master" rel="nofollow">https://bitbucket.org/ikosmik/uilistviewcontroller/src/ddfcd140b52e6e59d84e58d34d601f8f850145a1/UIList/UIListViewController.h?at=master</a></p>
  
  <p>And am trying to use the delegate in a UIViewController called View_Exporter</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "UIListViewController.h"
  
  @interface View_Exporter : UIViewController &lt;UIListViewDelegate, UIListViewDataSource&gt;
  
    @property (nonatomic, strong) IBOutlet UIView *viewForList; 
    @property (nonatomic, strong) UIListViewController *listViewController;
  
  @end
  </code></pre>
  
  <p>View_Exporter.m</p>
  
  <pre><code>#import "View_Exporter.h"
  
  
  @implementation View_Exporter
  
  @synthesize arraySelectedList;
  @synthesize viewForList;
  @synthesize listViewController;
  
  
  
  #pragma mark - UIListViewController Methods
  
  -(NSArray *) itemsForList {
      NSLog(@"View_Exporter itemsForList");
      NSArray *array = [NSArray arrayWithObjects:@"Server", @"Memory", nil];
      return array;
  }
  
  
  - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  {
      self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
      if (self) {
          // Custom initialization
      }
      return self;
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      // Do any additional setup after loading the view.
      self.listViewController = [[UIListViewController alloc] initWithNibName:@"UIListViewController" bundle:nil];
      self.listViewController.listViewDelegate = self;
      //[self.viewForList addSubview:self.listViewController.view];
      self.listViewController.listViewDataSource = self;
  
  }
  
  @end
  </code></pre>
  
  <p>But this line in viewDidLoad seems to loop infinitely when I run the code :</p>
  
  <pre><code>self.listViewController.listViewDelegate = self;
  </code></pre>
  
  <p>Why is this looping infinitely? Am breaking my head since yesterday on this. not sure where am going wrong. can someone please help?</p>