IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label UIBarButtonItem. Show all posts
Showing posts with label UIBarButtonItem. Show all posts

Thursday, April 11, 2013

Problem with UIBarButtonItem


Im having a problem trying to get my home button UIBarButtonItem back to my initial ViewController.



I have this code within the viewDidLoad method:



//  Create a home button


UIBarButtonItem *homeButton = [[UIBarButtonItem alloc] initWithTitle:@"Home" style:UIBarButtonItemStylePlain target:self action:@selector(goHome:)];


[self.navigationItem setLeftBarButtonItem:homeButton animated:NO];



//  Go to home page


- (void) goHome {


ViewController *view1 = [[ViewController alloc]initWithNibName:@"ViewController" bundle:nil];


[self presentViewController:view1 animated:YES completion:nil];


}



When I try and invoke the function goHome by clicking the button, I get NSInvalidArgumentException



Thanks in advance 


View the original article here