I am trying to release the label text each time the person click on a book title from the table view, it should change the detailViewController label (titleLabel) however it keeps showing the same book title.
Wondering If i have done something wrong - well I know I have but wondering how I fix it...
//
// BookDetailViewController.m
#import "BookDetailViewController.h"
#import "Book.h"
@implementation BookDetailViewController
@synthesize aBook, titleLabel;
// Implement viewDidLoad to do additional setup after loading the view.
- (void)viewDidLoad {
[super viewDidLoad];
[self bookDes];
self.title = @"Book Detail";
}
-(void)bookDes {
[self.titleLabel setText:nil];
[self.titleLabel setText:aBook.title];
}
- (void)dealloc {
[aBook release];
[titleLabel release];
[super dealloc];
}
@end