I have added a UIBarButtonItem in the main screen and created a b.xib, b.h and b.m files for it. when i click on the button it should open the respected screen but it doesn't and opens blank screen.
I am very new to iOS programming....
below is the code in A.m
file where I added button and when click on it it should open b.xib
.
UIBarButtonItem *bButton = [[UIBarButtonItem alloc]
initWithTitle:@"B"
style:UIBarButtonItemStyleBordered
target:self
action:@selector(openB:)];
self.navigationItem.leftBarButtonItem = bButton;
bButton.TintColor = [UIColor colorWithRed:0.0 green:0.31 blue:0.56 alpha:1.0];
[bButton release];
- (void)openB:(id)sender {
BViewController *b = [[BViewController alloc] init];
// ttod.defViewC = self; //Bookmarks from the definition view
[self presentModalViewController:b animated:YES];
[b release];
}
any idea...how can i make it work perfectly...