UITextView does not display text - uitextview

In my viewDidLoad I can get UILabels and UITextFields to display text but not a UITextView. Am I doing something wrong in the code below?
- (void)viewDidLoad {
[super viewDidLoad];
UIView* headerWrapper = [[UIView alloc] init];
//tap gesture is for each section so we can click on it
UITapGestureRecognizer *headerTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:#selector(showContent:)];
header = [[UIView alloc] initWithFrame: CGRectMake(10.0, 10.0, 738.0, 40.0)];
header.backgroundColor = [UIColor blackColor];
//get the header frame
CGRect headerFrame = header.frame;
//add the gesture
[headerWrapper addGestureRecognizer:headerTap];
//add a label
UILabel* lblSectionTitle = [[UILabel alloc] initWithFrame: CGRectMake(10.0, 3.0, headerFrame.size.width, 24.0)];
lblSectionTitle.text = #"This is a test";
lblSectionTitle.font = [UIFont fontWithName:#"Helvetica" size:20.0];
lblSectionTitle.textColor = [UIColor whiteColor];
lblSectionTitle.backgroundColor = [UIColor clearColor];
[header addSubview:lblSectionTitle];
[headerWrapper addSubview:header];
//this is the wrapper for the content
UIView* contentView = [[UIView alloc] initWithFrame:CGRectMake(10.0, headerFrame.size.height + 15.0, headerFrame.size.width, 200.0)];
contentView.backgroundColor = [UIColor redColor];
UITextView* tvContent = [[UITextView alloc] initWithFrame:CGRectMake(0.0, 0.0, headerFrame.size.width, 200.0)];
[tvContent setText:#"This is a content test."];
tvContent.textColor = [UIColor blackColor];
tvContent.backgroundColor = [UIColor clearColor];
tvContent.font = [UIFont fontWithName:#"Trebuchet" size:18.0];
[contentView addSubview:tvContent];
[headerWrapper addSubview:contentView];
[self.view addSubview:headerWrapper];
NSLog(#"%#", tvContent.text);
}

I just had this problem today and solved it by changing:
[tvContent setText:#"This is a content test."];
to
tvContent.text = #"This is a content test.";
At first I thought the problem was with not having my UITextView loaded. But after I made sure it was loaded and connected in the interface builder (not your case since you are doing it programmatically), I could only set its content by doing direct attribution instead of calling setText.
Hope it helps!

Related

UILabels NOT Updating

I have a UITableView that is being populated by core data. Now, when I click on a cell, it pushes me to another view where I can edit the data that is in that particular index, when I return, the system either crashes or else doesn't load the changes onto the labels, any ideas? code below
-(void)viewWillAppear:(BOOL)animated
{
searchCriteria = [[NSMutableString alloc] initWithString:#"clientName"];
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:#"clientName" ascending:YES];
NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
[fetchRequest setSortDescriptors:sortDescriptors];
NSEntityDescription *entity = [NSEntityDescription entityForName:#"Client" inManagedObjectContext:managedObjectContext];
[fetchRequest setEntity:entity];
fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:nil cacheName:#"Root"];
[self.clientTableView reloadData];
[super viewWillAppear:animated];
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = #"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
Client * client = [self.fetchedResultsController objectAtIndexPath:indexPath];
clientNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0, 250.00, 30.0)];
clientNameLabel.tag = 1;
clientNameLabel.backgroundColor = [UIColor clearColor];
clientNameLabel.textColor = [UIColor whiteColor];
clientNameLabel.font = [UIFont boldSystemFontOfSize:13];
clientNameLabel.text = client.clientName;
[cell.contentView addSubview:clientNameLabel];
clientAccountNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(15.0, 35.0, 250.00, 30.00)];
clientAccountNumberLabel.tag = 2;
clientAccountNumberLabel.textColor = [UIColor whiteColor];
clientAccountNumberLabel.backgroundColor = [UIColor clearColor];
clientAccountNumberLabel.font = [UIFont boldSystemFontOfSize:13];
clientAccountNumberLabel.text = client.clientAccountNumber;
[cell.contentView addSubview:clientAccountNumberLabel];
clientTelephoneNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(300.0, 0.0, 250, 30.00)];
clientTelephoneNumberLabel.tag = 3;
clientTelephoneNumberLabel.textColor = [UIColor whiteColor];
clientTelephoneNumberLabel.backgroundColor = [UIColor clearColor];
clientTelephoneNumberLabel.font = [UIFont boldSystemFontOfSize:13];
[cell.contentView addSubview:clientTelephoneNumberLabel];
addressLine1Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)];
addressLine1Label.tag = 4;
addressLine1Label.textColor = [UIColor whiteColor];
addressLine1Label.backgroundColor = [UIColor clearColor];
addressLine1Label.font = [UIFont boldSystemFontOfSize:13];
addressLine1Label.text = client.addressLine1;
[cell.contentView addSubview:addressLine1Label];
addressLine2Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)];
addressLine2Label.tag = 5;
addressLine2Label.textColor = [UIColor whiteColor];
addressLine2Label.backgroundColor = [UIColor clearColor];
addressLine2Label.text = client.addressLine2;
addressLine2Label.font = [UIFont boldSystemFontOfSize:13];
[cell.contentView addSubview:addressLine2Label];
addressLine3Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)];
addressLine3Label.tag = 6;
addressLine3Label.textColor = [UIColor whiteColor];
addressLine3Label.backgroundColor = [UIColor clearColor];
addressLine3Label.font = [UIFont boldSystemFontOfSize:13];
addressLine3Label.text = client.addressLine3;
[cell.contentView addSubview:addressLine3Label];
addressLine4Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)];
addressLine4Label.tag = 7;
addressLine4Label.textColor = [UIColor whiteColor];
addressLine4Label.backgroundColor = [UIColor clearColor];
addressLine4Label.font = [UIFont boldSystemFontOfSize:13];
addressLine4Label.text = client.addressLine4;
[cell.contentView addSubview:addressLine4Label];
return cell;
}
The Crash Logs are as follows:
2012-06-23 17:08:05.541 iSalesForce[11773:15803] no object at index 1 in section at index 0
And some other code you might find useful are:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [fetchedObjects count];
}
- (float)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 70.0;
}
The problem is most likely in the fact your fetchedResultsController has gone stale (are you using ARC? is that fetchedResultsController a "strong" property?
Or it may simply be that your fetchedResultsController has no objects and you're insisting that you have exactly one object in your "numberOfSectionsInTableView" method, regardless of the true contents of "fetchedResultsController".
Try this new & improved function:
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = #"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
if(cell == nil)
{
// this should never happen, but just in case...
NSLog( #"cell is still - unexpectedly - nil" );
} else {
if(self.fetchedResultsController == nil)
{
NSLog( #"surprise, fetchedResultsController is nil" );
} else {
Client * client = nil;
#try {
client = [self.fetchedResultsController objectAtIndexPath:indexPath];
}
#catch (NSException * e) {
NSLog( #"exception thrown while trying to fetch something from fetchedResultsController - %# %#", [e name], [e reason] );
}
#finally {
clientNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0, 250.00, 30.0)];
clientNameLabel.tag = 1;
clientNameLabel.backgroundColor = [UIColor clearColor];
clientNameLabel.textColor = [UIColor whiteColor];
clientNameLabel.font = [UIFont boldSystemFontOfSize:13];
clientNameLabel.text = client.clientName;
[cell.contentView addSubview:clientNameLabel];
clientAccountNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(15.0, 35.0, 250.00, 30.00)];
clientAccountNumberLabel.tag = 2;
clientAccountNumberLabel.textColor = [UIColor whiteColor];
clientAccountNumberLabel.backgroundColor = [UIColor clearColor];
clientAccountNumberLabel.font = [UIFont boldSystemFontOfSize:13];
clientAccountNumberLabel.text = client.clientAccountNumber;
[cell.contentView addSubview:clientAccountNumberLabel];
clientTelephoneNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(300.0, 0.0, 250, 30.00)];
clientTelephoneNumberLabel.tag = 3;
clientTelephoneNumberLabel.textColor = [UIColor whiteColor];
clientTelephoneNumberLabel.backgroundColor = [UIColor clearColor];
clientTelephoneNumberLabel.font = [UIFont boldSystemFontOfSize:13];
[cell.contentView addSubview:clientTelephoneNumberLabel];
addressLine1Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)];
addressLine1Label.tag = 4;
addressLine1Label.textColor = [UIColor whiteColor];
addressLine1Label.backgroundColor = [UIColor clearColor];
addressLine1Label.font = [UIFont boldSystemFontOfSize:13];
addressLine1Label.text = client.addressLine1;
[cell.contentView addSubview:addressLine1Label];
addressLine2Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)];
addressLine2Label.tag = 5;
addressLine2Label.textColor = [UIColor whiteColor];
addressLine2Label.backgroundColor = [UIColor clearColor];
addressLine2Label.text = client.addressLine2;
addressLine2Label.font = [UIFont boldSystemFontOfSize:13];
[cell.contentView addSubview:addressLine2Label];
addressLine3Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)];
addressLine3Label.tag = 6;
addressLine3Label.textColor = [UIColor whiteColor];
addressLine3Label.backgroundColor = [UIColor clearColor];
addressLine3Label.font = [UIFont boldSystemFontOfSize:13];
addressLine3Label.text = client.addressLine3;
[cell.contentView addSubview:addressLine3Label];
addressLine4Label = [[UILabel alloc] initWithFrame:CGRectMake(315.0, 35.0, 250, 30.00)];
addressLine4Label.tag = 7;
addressLine4Label.textColor = [UIColor whiteColor];
addressLine4Label.backgroundColor = [UIColor clearColor];
addressLine4Label.font = [UIFont boldSystemFontOfSize:13];
addressLine4Label.text = client.addressLine4;
[cell.contentView addSubview:addressLine4Label];
}
Client * client = [self.fetchedResultsController objectAtIndexPath:indexPath];
}
}
return cell;
}
(I didn't actually test this out... but I did put some new error checking and exception handling into it for you)

How to clear previous view when loading new detail view when a row is clicked in UITableView - iOS4

I need to display a detailed view controller with multiple labels when a row in a table view is clicked. The labels I am displaying are of dynamic height based on the content, which is being read from the iPhone's internal calendar. I have been able to implement the loading of detail views based on which row in the table view has been selected. My issue is that the previous detail view does not get cleared up when a new row is clicked. Especially in the case when my previous detail view had longer labels and the new detail view has shorter labels, I can see the content of the previous labels below the new one. How can I clear up the entire Detail View controller before reloading it with the new row's data. Following is the code I am using:
RootViewController.m
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (mdController == nil) {
MtgDetailController *aController = [[MtgDetailController alloc] initWithNibName:#"MtgDetailController" bundle:nil];
self.mdController = aController;
[aController release];
}
self.mdController.mtgIndex = indexPath.row;
// mdController.mtgIndex = indexPath.row;
// [mdController setMtgIndex:indexPath.row];
// NSInteger temp = indexPath.row;
UIActionSheet *action = [[UIActionSheet alloc]
initWithTitle:#"Select an Option"
delegate:self
cancelButtonTitle:#"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:#"Open Meeting", #"Dial into meeting", nil];
[action showInView:self.parentViewController.view];
[action release];
}
MtgDetailController.m (This is the Detail View Controller)
-(void) viewDidAppear:(BOOL)animated {
// [self reloadInputViews];
Smart_MeetingAppDelegate *myDelegate = (Smart_MeetingAppDelegate *)[[UIApplication sharedApplication]delegate];
CGRect scrollViewFrame = CGRectMake(0, 0, 320, 460);
NSString *title = [myDelegate.titles objectAtIndex:self.mtgIndex];
NSString *mtg_time = [myDelegate.mtg_times objectAtIndex:self.mtgIndex];
NSString *loc = #"Conf Room 123";
// detail = #"test mtg test mtg. Dial number: 3334445555, (333)444-5555, 333-333-5555. ID: 4455333344, Password: 6576567";
detail = [myDelegate.detail_array objectAtIndex:self.mtgIndex];
NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:#"\\b[0-9]+(\\-)?(\\))?(\\.)?(\\s)?([0-9]+)?(\\-)?(\\.)?(\\s)?([0-9]+)?(\\-)?(\\.)?(\\s)?([0-9]+)?\\b" options:NSRegularExpressionCaseInsensitive error:nil];
NSArray* matches = [regex matchesInString:detail options:0 range:NSMakeRange(0, [detail length])];
[regex release];
unichar chr[1] = {'\n'};
NSString *singleCR = [NSString stringWithCharacters:(const unichar *)chr length:1];
NSString *titleRow = [NSString stringWithFormat:#"%# %# %#", title, singleCR, mtg_time];
NSMutableAttributedString *attrTitle = [NSMutableAttributedString attributedStringWithString:titleRow];
[attrTitle setFont:[UIFont systemFontOfSize:18] range:[titleRow rangeOfString:title]];
[attrTitle setFont:[UIFont systemFontOfSize:16] range:[titleRow rangeOfString:mtg_time]];
NSMutableAttributedString *attrLoc = [NSMutableAttributedString attributedStringWithString:loc];
NSMutableAttributedString *attrDetail = [NSMutableAttributedString attributedStringWithString:detail];
[attrDetail setFont:[UIFont systemFontOfSize:16]];
CGSize suggestedSize = [attrTitle sizeConstrainedToSize:CGSizeMake(300, FLT_MAX)];
CGRect frame1 = CGRectMake(10, 15, 300, suggestedSize.height);
OHAttributedLabel *lblTitle = [[OHAttributedLabel alloc] initWithFrame:frame1];
lblTitle.numberOfLines = 0;
CGSize size2 = [attrLoc sizeConstrainedToSize:CGSizeMake(300, FLT_MAX)];
CGRect frame2 = CGRectMake(10, suggestedSize.height+15+5, 300, size2.height);
OHAttributedLabel *lblLocation = [[OHAttributedLabel alloc] initWithFrame:frame2];
CGFloat temp = size2.height+suggestedSize.height;
CGSize size3 = [attrDetail sizeConstrainedToSize:CGSizeMake(300, FLT_MAX)];
CGRect frame3 = CGRectMake(10, temp+15+5, 300, size3.height);
OHAttributedLabel *lblDescription = [[OHAttributedLabel alloc] initWithFrame:frame3];
lblDescription.numberOfLines = 0;
lblTitle.attributedText = attrTitle;
lblLocation.attributedText = attrLoc;
lblDescription.attributedText = attrDetail;
for (NSTextCheckingResult *m in matches) {
NSString *num = [detail substringWithRange:m.range];
NSRange linkRange = [detail rangeOfString:num];
[lblDescription addCustomLink:[NSURL URLWithString:#"user://certa"] inRange:linkRange];
}
lblDescription.delegate = self;
[self.view addSubview:lblTitle];
[self.view addSubview:lblDescription];
[self.view addSubview:lblLocation];
[lblTitle release];
[lblLocation release];
[lblDescription release];
}
You add three new instances of OHAttributedLabel to your detail view every time viewDidAppear: executes. You never remove these views. You need to save references to them (lblTitle, lblDescription, and lblLocation) in your MtgDetailController, and either remove them or reuse them the next time viewDidAppear: executes.
Add three properties to your MtgDetailController:
#property (retain) UILabel *lblTitle;
#property (retain) UILabel *lblDescription;
#property (retain) UILabel *lblLocation;
(Don't forget to #synthesize them too.)
At the top of viewDidAppear:, remove the labels from their superviews:
- (void)viewDidAppear:(BOOL)animated {
[self.lblTitle removeFromSuperview];
[self.lblDescription removeFromSuperview];
[self.lblLocation removeFromSuperview];
...
At the bottom of viewDidAppear:, save your newly-created labels in the properties:
self.lblTitle = lblTitle;
self.lblLocation = lblLocation;
self.lblDescription = lblDescription;

UIActionsheet orientation issue

I am working on orientation of actionsheet with pickerview. It is working finely on potrait mode but it is not working on landscape mode. May I know where i went wrong?
Regards,
sathish
- (IBAction)openActionSheet
{
UIView *ui_pickerview = [[[UIView alloc] initWithFrame:CGRectMake(0, 160, 320, 305)] autorelease];
pickerViewPopup = [[UIActionSheet alloc] initWithTitle:#""
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:nil];
UIImageView *pickerImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0,44,320,213)];
pickerImageView.image = [UIImage imageNamed:#"picker.png"];
UIImageView *homeImageView = [[UIImageView alloc] initWithFrame:CGRectMake(5,137,30,24)];
homeImageView.image = [UIImage imageNamed:#"picker_icon_home.png"];
m_pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0,44,0,0)];
m_pickerView.delegate = self;
//m_pickerView.dataSource = self;
m_pickerView.showsSelectionIndicator = NO;
//pickerView.
pickerToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
pickerToolbar.barStyle = UIBarStyleDefault;
pickerToolbar.tintColor = [UIColor colorWithRed:134/255.0 green:187/255.0 blue:34/255.0 alpha:1];
[pickerToolbar sizeToFit];
NSMutableArray *barItems = [[NSMutableArray alloc] init];
UIBarButtonItem *doneBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:#selector(DonePicker:)];
[barItems addObject:doneBtn];
[doneBtn release];
UIBarButtonItem *flexSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil];
[barItems addObject:flexSpace];
[flexSpace release];
UIBarButtonItem *cancelBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:#selector(closePicker:)];
[barItems addObject:cancelBtn];
[cancelBtn release];
[pickerToolbar setItems:barItems animated:YES];
[barItems release];
[pickerViewPopup addSubview:pickerToolbar];
[pickerViewPopup addSubview:m_pickerView];
//[pickerViewPopup addSubview:pickerImageView];
[pickerImageView release];
//[pickerViewPopup addSubview:homeImageView];
[homeImageView release];
[pickerViewPopup showInView:ui_pickerview];
[pickerViewPopup setBounds:CGRectMake(0,0,320, 464)];
}
If you are not adding your UIActionSheet to a view controller that is handling the orientation for landscape, then the UIActionSheet will come up in portrait.

why I have got such kind of BarButton one upon other?

Hi!I have used UIBarButton Image but i have got such kind of issue.i mean Image+button on backside.for that i have written code below.
UIBarButtonItem *btnMap = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:#"mapbutton.png"] style:UIBarButtonItemStylePlain target:self action:#selector(btnMapClicked:)];
self.navigationItem.rightBarButtonItem = btnMap;
[btnMap release];
Use initWithCustomView and set a UIButton as the customView instead:
UIButton *subBtn = [UIButton buttonWithType:UIButtonTypeCustom];
subBtn.frame = CGRectMake(0, 0, 50, 40); //adjust as needed
[subBtn setImage:[UIImage imageNamed:#"mapbutton.png"] forState:UIControlStateNormal];
[subBtn addTarget:self action:#selector(btnMapClicked:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *btnMap = [[UIBarButtonItem alloc] initWithCustomView:subBtn];
self.navigationItem.rightBarButtonItem = btnMap;
[btnMap release];
Note that the sender in btnMapClicked: will now be a UIButton instead of a UIBarButtonItem.

CoverFlow multiple Views

Good Morning at all,
i have a big problem in the following code and no solution, so i hope someone could
help me:
- (IBAction)goToChart {
[rootViewController switchViews];
}
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
UIButton *weiter = [UIButton buttonWithType:UIButtonTypeRoundedRect];
weiter.frame = CGRectMake(100, 400, 120, 40);
[weiter addTarget:self action:#selector(goToChart) forControlEvents:UIControlEventTouchUpInside];
NSString *ansicht = #"Weiter";
[weiter setTitle:ansicht forState:UIControlStateNormal];
[self.view addSubview:weiter];
// loading images into the queue
loadImagesOperationQueue = [[NSOperationQueue alloc] init];
NSString *imageName;
for (int i=0; i < 10; i++) {
imageName = [[NSString alloc] initWithFormat:#"cover_%d.jpg", i];
imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imageName]];
UIImage *aktuellesImage = imageView.image;
UIImage *scaledImage = [aktuellesImage scaleToSize:CGSizeMake(100.0f, 100.0f)];
[(AFOpenFlowView *)self.view setImage:scaledImage forIndex:i];
[imageName release];
NSLog(#"%d is the index",i);
}
[(AFOpenFlowView *)self.view setNumberOfImages:10];
}
So you can see there 10 Images in this CoverFlowView, but how could i find out the ACTUAL picture that is in front, to use this in another view??
Could someone help me, please?
Greetings Marco
-(void)openFlowView: (AFOpenFlowView *)openFlowView imageSelected:(int)index
{
AppDelegate_iPhone *appDelegate = (AppDelegate_iPhone *)[[UIApplication sharedApplication]delegate];
db_detail = (DB_data *)[self.GalleryArray objectAtIndex:index];
appDelegate.Id = db_detail.Id;
// NSLog(#"id: value is %d",db_detail.Id);
// NSLog(#"Name vlaue is: %#",db_detail.Name);
appDelegate.title = db_detail.Name;
DetailMovieViewController *ViewController = [[DetailMovieViewController alloc]init];
[self.navigationController pushViewController:ViewController animated:YES ];
[ViewController release];
[db_detail release];
}

Resources