Search Results

Search found 46 results on 2 pages for 'uitable'.

Page 1/2 | 1 2  | Next Page >

  • Pushing to a UITable inside a UIView from a UITableview

    - by Michael Robinson
    I can firgure out how to push a UIView from a Tableview and have the "child" details appear. Here is the view I'm trying to load: Here is the code that checks for children and either pushes a itemDetail.xib or an additional UITable, I want to use the above .xib but load the correct contents "tableDataSource" into the UItable: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //Get the dictionary of the selected data source. NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row]; //Get the children of the present item. NSArray *Children = [dictionary objectForKey:@"Children"]; if([Children count] == 0) { ItemDetailViewController *dvController = [[ItemDetailViewController alloc] initWithNibName:@"ItemDetailView" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:dvController animated:YES]; [dvController release]; } else { //Prepare to tableview. FirstTab *rvController = [[FirstTab alloc] initWithNibName:@"FirstView" bundle:[NSBundle mainBundle]]; //Increment the Current View rvController.CurrentLevel += 1; //Set the title; rvController.CurrentTitle = [dictionary objectForKey:@"Title"]; //Push the new table view on the stack [self.navigationController pushViewController:rvController animated:YES]; rvController.tableDataSource = Children; [rvController release]; } } Thanks for the help. I see lots of stuff on this but can't find the correct push instructions.

    Read the article

  • How to let the UITable sorted by number?

    - by Tattat
    I loaded a plist from the UITable, but there is something wrong. my plist file is some data like that: 3 3uyyhuhu34 ..... 5 5uyyhuhu34 ..... 11 11uyyhuhu34 ..... I found that the list is sorted from 11, then 3, after that is 5. But I want to sorted from 3, 5 to 11. What can I do to change the behaviors? thx

    Read the article

  • Reload a UITable on the fly when editing a UITextField inside one of the cells

    - by Saze
    I have a UITable containing some customs UITableCells. Those cells contain a few UILabels and a UITextField. The datasource of the table comes from a main controller's property. (This controller is also the delegate and the dataSource for the table). Here's a simplified screenshot of the UI: Now, I need to update "on the fly" the content of all the UILabels when the user edits one of the UITextFields. To do so, at the I am listening to the "Editing Changed" event at the UITextField level. This triggers the following action: - (IBAction) editChangeHandler: (id) sender { MyAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [[delegate.viewController.myDataSourceArray objectAtIndex:self.rowIndex] setANumber: [theTextField.text intValue]]; [delegate.viewController reloadRows]; } The reloadRows method in the viewController is as such: - (void) reloadRows { NSLog(@"called reloadRows"); //perform some calculations on the data source objects here... [theUITable reloadData]; } My problem here is that whenever the user changes the value in the field, the reloadRows method is successfully called, so is apparently the reloadData but it also causes the keyboard to be dismissed. So in the end, the user can only touch one key when editing the TextField before the keyboard is dismissed and the table reloaded. Does anybody knows a solution to this or have experienced the same issue?

    Read the article

  • Adding a dynamic image to UITable View Cell

    - by Graeme
    Hi, I have a table in which I want a dynamic image to load in at the left-hand side. The table needs to use an IF statement to select the appropriate image from the "Resources" folder, and needs to be based upon [dog types]. The [dog types] is extracted from an RSS feed, and so the image in the table cell needs to match the each cell's [dog types] tag. Update: See code below for what I'm looking to do (only below it's for earthquakes, for me its pictures of dogs). I suspect I need to use - (UIImage *)imageForTypes:(NSString *)types { to do such a thing. Thanks. Updated code: This is for Apple's Earthquake sample but does exactly what I need to do. It matches images to the severity (2.0, 3.0, 4.0, 5.0 etc.) of every earthquake to the magnitude. - (UIImage *)imageForMagnitude:(CGFloat)magnitude { if (magnitude >= 5.0) { return [UIImage imageNamed:@"5.0.png"]; } if (magnitude >= 4.0) { return [UIImage imageNamed:@"4.0.png"]; } if (magnitude >= 3.0) { return [UIImage imageNamed:@"3.0.png"]; } if (magnitude >= 2.0) { return [UIImage imageNamed:@"2.0.png"]; } return nil; } and under - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath magnitudeImage.image = [self imageForMagnitude:earthquake.magnitude];

    Read the article

  • Add blank cell at end of UITable

    - by Michael
    I'm trying to add an additional cell for custom content as the last cell in a tableView, without altering the dictionary that creates the other content of the table. I think the place to add it is in cellForRowAtIndexPath rather than adding one to the numberOfRowsInSection, which just crashes if I do. I get a cellCount from the dictionary that creates the data for the table, then in cellForRowAtIndexPath, I have: if (indexPath.row == cellCount) { ... stuff goes here return cell; } of course, this never gets called. If I do if (indexPath.row == cellCount -1) it overwrites the last cell with content. I can get this to work if I add a blank entry into the xml from which I am populating the dictionary, but that's ugly. Example code would be neat!

    Read the article

  • UITable row to add an item

    - by Moshe
    I want to make a TableView of phrases which the user can edit. The "Phrase editor" is being displayed modally. My top left is for the Done button right now. I'm considering making a button at the end of the table for "new phrase". How would I implement that? Is it a good idea to follow the "contacts" application and make a + button in the top right, or Should I make the "Add Items" button at the end of the list? What are HIG implications of either one? BONUS: Where can I find some tutorials on Navigation Controllers and Table Views? Thanks a ton.

    Read the article

  • UIImage Fade in after load on my UITable

    - by Cy
    I have an UIImage that loads from the web, and I'd like it to fade in when it displays in my UITableCell. if([thumb image]) { UIImage *imagen = [thumb.image retain]; [imagen drawInRect:CGRectMake(15, 4, 44, 44)]; [imagen release]; } How could I achieve it?

    Read the article

  • Adding a Image to UITable View Cell

    - by Graeme
    Hi, I have a table in which I want a dynamic image to load in at the left-hand side. The table needs to use an IF statement to select the appropriate image from the "Resources" folder, and needs to be based upon [dog types]. The [dog types] is extracted from an RSS feed, and so the image in the table cell needs to match the each cell's [dog types] tag. I suspect I need to use - (UIImage *)imageForTypes:(NSString *)types { to do such a thing. Thanks.

    Read the article

  • UITable View Issue,

    - by abc
    hello i am having same issue, i tried your solution but it didnt help me in my case.. i am not getting exception but view is not getting changed.. my piece of code is as below printf("hi"); //Get the selected country NSString *selectedCountry = [listOfItems objectAtIndex:indexPath.row]; //Initialize the detail view controller and display it. DetailViewController *aSecondView = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:nil]; // aSecondView.selectedCountry = selectedCountry; [self.navigationController pushViewController:aSecondView]; [aSecondView release]; aSecondView = nil; printf("bye.."); both hi and bye gets printed but view doesnt change.. i have wasted 2 days around it .. plz help me out..

    Read the article

  • Signal "0" error while scrolling a tableview with images

    - by Amitkumar
    Hi, I have a problem while scrolling images on tableview. I am getting a Signal "0" error. I think it is due to some memory issues but I am not able to find out the exact error. The code is as follows, - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [travelSummeryPhotosTable dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]autorelease]; } //Photo ImageView UIImageView *photoTag = [[UIImageView alloc] initWithFrame:CGRectMake(5.0, 5.0, 85.0, 85.0)]; NSString *rowPath =[[imagePathsDictionary valueForKey:[summaryTableViewDataArray objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row]; photoTag.image = [UIImage imageWithContentsOfFile:rowPath]; [cell.contentView addSubview:photoTag]; [photoTag release]; // Image Caption UILabel *labelImageCaption = [[UILabel alloc] initWithFrame:CGRectMake(110.0, 15.0, 190.0, 50.0)]; labelImageCaption.textAlignment = UITextAlignmentLeft; NSString *imageCaptionText =[ [imageCaptionsDictionary valueForKey:[summaryTableViewDataArray objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row]; labelImageCaption.text = imageCaptionText; [cell.contentView addSubview:labelImageCaption]; [labelImageCaption release]; return cell; } Thanks in advance.

    Read the article

  • Multiple Row Selection in UIPickerView

    - by medma
    hi frends, Today I have a problem related to uipicker. I want to select multiple rows in picker, so I have an idea to show my data in a table and add this table as subview to picker. I have tried a lot but didn't succeed. Please help if u can?? Thanx Ankit

    Read the article

  • Converting a CGRect of a object in a subview in UITableViewCell in UITable to CGRect with respect to

    - by user362956
    Hey, I want to converte a CGRect "aRect" of a object in a subview in UITableViewCell in UITable to CGRect with respect to self.view. The problem is that aRect is with respect to the subview in the table cell. But i want to make it so that it is with respect to self.view What i tried is this rect = [self.view convertRect:aRect.frame toView:cellView]; but it doesn't work. So how to convert it?

    Read the article

  • How to do a UITable cell with triangle indicator?

    - by zardon
    In the Linked in iphone application I noticed that they have a tableview, see the following picture with what appears to have a triangle indicator pointing upwards. Notice how the tableview cell has a little triangle pointing upwards and is part of a tableview cell. The triangle is the ---^--- part of the image. I'm wondering. How do you make a UITableView with this triangle indicator, and what is this effect called? Thanks

    Read the article

  • How to navigate clicking row to another UITableView ?

    - by Meko
    Hi. I am trying to show detailed UItable view when clicking on row. I used - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; photoListViewController = [[PhotoListViewController alloc]initWithNibName:@"PhotoListViewController" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:photoListViewController animated:YES]; [photoListViewController release]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; } This PhotoListViewController is an empty UITableViewController. As I know UITableViewCOntroller has a navigation controller implemented and I don`t have to create navigation controller. But When I clicked on row it does not navigate to second view.AM I have to make some connection on nib file?I only created this PhotoListViewController in File-New-UIViewCOntroller and selected UITableView. EDIT : SOLVED I solved my problem.I should use UINAvigation object.I thought that UITable has it but there was no ))

    Read the article

  • Loading a UIView from a UITableview

    - by Michael Robinson
    I can firgure out how to push a UIView from a Tableview and have the "child" details appear. Here is the view I'm trying to load: Here is the code that checks for children and either pushes a itemDetail.xib or an additional UITable, I want to use the above .xib but load the correct contents "tableDataSource" into the UItable: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //Get the dictionary of the selected data source. NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row]; //Get the children of the present item. NSArray *Children = [dictionary objectForKey:@"Children"]; if([Children count] == 0) { ItemDetailViewController *dvController = [[ItemDetailViewController alloc] initWithNibName:@"ItemDetailView" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:dvController animated:YES]; [dvController release]; } else { //Prepare to tableview. FirstTab *rvController = [[FirstTab alloc] initWithNibName:@"FirstView" bundle:[NSBundle mainBundle]]; //Increment the Current View rvController.CurrentLevel += 1; //Set the title; rvController.CurrentTitle = [dictionary objectForKey:@"Title"]; //Push the new table view on the stack [self.navigationController pushViewController:rvController animated:YES]; rvController.tableDataSource = Children; [rvController release]; } } Thanks for the help. I see lots of stuff on this but can't find the correct push instructions.

    Read the article

  • FREED(id): message release sent to freed object error solution ?

    - by Meko
    Hi.In my Iphone app I am getting: objc[597]: FREED(id): message release sent to freed object=0x3b81780 error.What should cause this error?IS it about memory allocation? I have UITable and model view that include some text field.It takes username from model view and search this in internet and gets some images from internet.It takes data but when model view disappears app exits.and gives that error.When model views close it runs my method and gets value.But it exits from app.

    Read the article

  • NSMutableArray: count is a method or a property?

    - by Rafael Oliveira
    I want to verify if I'm in the last cell of the UITable. Should I use a NSInteger property in my controller and store the value of the count of the data (it's an NSMutableArray) that populates the table? I'm asking because I don't know if count iterates over all objects of the array to count or if it only gets me a value of a count property. What would be better ? store the value: myCount = [myArray count] use directly: [myArray count] store numberOfRows: myCount = numberOfRowsInSection:[indexPath 0] use numberOfRows directly: numberOfRowsInSection:[indexPath 0]

    Read the article

  • Navigation based popover ?

    - by user341513
    I would like to make a navigation based popover master pane kinda like the one in ipad mail app.I already have the data in a uitable view in the popover, how would i put each of them nd their own category in a navigation based popover. Thanks, Elvin

    Read the article

  • Is there a way to fix the background image of a UITableView

    - by user337174
    Hi I have set the background of my UITable with a custom image. self.tableView.backgroundColor = [UIColor clearColor]; self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"background.png"]]; The problem im having is the background image is scrolling and doesn't look good at the top and bottom of the screen where you see the image being joined. Is there a way to fix the position of the background image and just have the table scroll over the top of it?

    Read the article

  • getting record from CoreData ?

    - by Meko
    Hi. I am trying to add value to CoreData from .plist and get from coreData and show them on UITable. I made take from .plist and send them to CoreData .But I cant take them from CoreData entity and set to some NSMutable array.. Here my codes Edit : SOLVED NSString *path = [[NSBundle mainBundle] pathForResource:@"FakeData" ofType:@"plist"]; NSArray *myArray=[[NSArray alloc] initWithContentsOfFile:path]; FlickrFetcher *flickrfetcher =[FlickrFetcher sharedInstance]; managedObjectContext =[flickrfetcher managedObjectContext]; for(NSDictionary *dict in myArray){ Photo *newPhoto = (Photo *)[NSEntityDescription insertNewObjectForEntityForName:@"Photo" inManagedObjectContext:managedObjectContext]; // set the attributes for the photo NSLog(@"Creating Photo: %@", [dict objectForKey:@"name"]); [newPhoto setName:[dict objectForKey:@"name"]]; [newPhoto setPath:[dict objectForKey:@"path"]]; NSLog(@"Person is: %@", [dict objectForKey:@"user"]); NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name ==%@",[dict objectForKey:@"user"]]; NSMutableArray *peopleArray = (NSMutableArray *)[flickrfetcher fetchManagedObjectsForEntity:@"Person" withPredicate:predicate]; NSEnumerator *enumerator = [peopleArray objectEnumerator]; Person *person; BOOL exists = FALSE; while (person = [enumerator nextObject]) { NSLog(@" Person is: %@ ", person.name); if([person.name isEqualToString:[dict objectForKey:@"user"]]) { exists = TRUE; NSLog(@"-- Person Exists : %@--", person.name); [newPhoto setPerson:person]; } } // if person does not already exist then add the person if (!exists) { Person *newPerson = (Person *)[NSEntityDescription insertNewObjectForEntityForName:@"Person" inManagedObjectContext:managedObjectContext]; // create the person [newPerson setName:[dict objectForKey:@"user"]]; NSLog(@"-- Person Created : %@--", newPerson.name); // associate the person with the photo [newPhoto setPerson:newPerson]; } //THis IS myArray that I want to save value in it and them show them in UITABLE personList=[[NSMutableArray alloc]init]; NSLog(@"lllll %@",[personList objectAtIndex:0]); // save the data NSError *error; if (![managedObjectContext save:&error]) { // Handle the error. NSLog(@"Unresolved error %@, %@", error, [error userInfo]); exit(-1); } } //To access core data objects you can try the following: // setup our fetchedResultsController fetchedResultsController = [flickrfetcher fetchedResultsControllerForEntity:@"Person" withPredicate:nil]; // execute the fetch NSError *error; BOOL success = [fetchedResultsController performFetch:&error]; if (!success) { // Handle the error. NSLog(@"Unresolved error %@, %@", error, [error userInfo]); exit(-1); } // save our data //HERE PROBLEM THAT I DONW KNOW WHERE IT IS SAVING //[personList addObject:(NSMutableArray *)[fetchedResultsController fetchedObjects]]; [self setPersonList:(NSMutableArray *)[fetchedResultsController fetchedObjects]]; } Here my tableview function - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"ss %d",[personList count]); static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } cell.textLabel.text=[personList objectAtIndex:indexPath.row]; // Set up the cell... return cell; }

    Read the article

1 2  | Next Page >