Commits

Alfonso Alba García committed 5f1acc6

Adding "+" button to PTPeopleViewController

Comments (0)

Files changed (1)

ParseTest/PTPeopleViewController.m

 - (void) initializacion
 {
     self.title = @"People";
+    UIBarButtonItem *addPersonButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addPersonAction:)];
+    self.navigationItem.rightBarButtonItem = addPersonButton;
 }
 
 - (void)viewDidLoad
     // Dispose of any resources that can be recreated.
 }
 
-@end
+- (void) addPersonAction:(id) sender
+{
+    NSLog(@"Add person pressed");
+}
+@end