title: Register for remote notifications outside of app delegate
body: <p>Everything I have seen thus far indicates that I would setup a push notification alert in my <code>AppDelegate</code>. However, my app requires that the user goes through a registration process, and I do not want to ask the user if they would like to receive push notifications unless the user has arrived on the <code>viewController</code> that appears after the registration process is complete.</p>
  
  <p>Am I able to put some of this code in the <code>viewDidLoad</code> method of a view controller other than my app delegate? Do I need to leave those two bottom methods "<code>didRegisterForRemoteNotificationsWithDeviceToken</code>" and "<code>didReceiveRemoteNotification</code>" in my app delegate or should I move them to wherever I try to register for remote notifications?</p>
  
  <p>I am registering for push notifications in my app with the blocks of code below:</p>
  
  <p><strong>In the didFinishLaunchingWithOptions method of my app delegate:</strong></p>
  
  <pre><code>[application registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|
                                                  UIRemoteNotificationTypeAlert|
                                                  UIRemoteNotificationTypeSound];
  </code></pre>
  
  <p><strong>Methods added in my app delegate:</strong></p>
  
  <pre><code>- (void)application:(UIApplication *)application
          didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
  {
      // Store the deviceToken
  }
  
  - (void)application:(UIApplication *)application 
          didReceiveRemoteNotification:(NSDictionary *)userInfo {
      //handle push notification
  }
  </code></pre>
  
  <p>The resources I have visited indicate that this block of code </p>