title: how to use badges on uibutton like message app?
body: <p>I am newbie for <strong>iPhone development</strong>.i just create application like chat application.simple i use JSON parsing method and i call the data from server through PHP and send back to them.
  so i have one UIButton i would like to set badge on this <strong>UIButton</strong> i already set the <strong>badge</strong> through some coding like:</p>
  
  <p>on time of <strong>viewdid load: *<em>.m</strong> file</em>*</p>
  
  <pre><code>self.badgeFive = [[MKNumberBadgeView alloc] initWithFrame:CGRectMake(self.next7.frame.size.width - 22,-20,44,40)];
  [self.next7 addSubview:self.badgeFive];
  </code></pre>
  
  <p>in <strong>.h</strong> file:</p>
  
  <pre><code>@property (retain) MKNumberBadgeView* badgeFive;
  @property (unsafe_unretained, nonatomic) IBOutlet UIButton *next7;
  </code></pre>
  
  <p>in this above code next7 is click event.i can successfully <strong>add</strong> the <strong>badge</strong> on this button but faild to move to the next page.i cant click this <strong>button</strong> now. 
  on <strong>next7</strong> event i call this page:</p>
  
  <pre><code>-(IBAction)next7{
      msgfromuserViewController *tenth = [[msgfromuserViewController alloc] initWithNibName:nil bundle:nil];
     [self presentViewController:tenth animated:YES completion:NULL];
  }
  </code></pre>
  
  <p>so i need to <strong>show badges</strong> and as well as click this button and want to move to the next page.
  and simultaneously badge will show the number that are unread message. </p>
  
  <p>Is there any sample code or source code for this type of application which can manage the click event as well as shows the badges for <strong>unread message</strong>.
  i wonder a lot but i cant understand how can i develop? </p>