title: Pubnub iOS: How to change Pubnub delegate?
body: <p>I have 2 classes. The first class allows you to tap a button to subscribe to a channel.
  The first class is instantiated like so: </p>
  
  <pre><code>pubnub = [[CEPubnub alloc] initWithPublishKey:@"demo" subscribeKey:@"demo" secretKey:@"demo" cipherKey:nil useSSL:NO];
  [pubnub setDelegate:self];
  </code></pre>
  
  <p>In my second class, everything is great until I try to publish a message from the Pubnub developer console. When I do publish a message from the developer console I get output of "Received 1 messages from PubNub channel {name}. But the optional Pubnub delegate method I am using is getting called but not printing out my NSLOG.</p>
  
  <p>I rooted the issue with the delegate being set to my first class. But I am new to iPhone/objective C and could use some help in setting the delegate of my Pubnub object to the second class. </p>
  
  <p>I have tried to set the delegate to nil whenever the first class: viewWillDisappear and then set delegate again in the second class: viewWillAppear but no luck =(  Am I doing something wrong?</p>
  
  <p>Sorry if this is confusing, im still learning. :)</p>