Tag: uitableview

Resizing UIImageView within custom UITableViewCell yielding inconsistent results

I’m building a table based on a UITableViewCell prototype I have created in a XIB file. The cell consists of a couple labels and an image view, which needs to be stretched to fit the full device width. Once the width is stretched, I also want to stretch the height to the same proportion, so […]

UIScrollView and UIPageControl within UITableView

I’ve seen lots of sources saying it is possible to include a UIScrollView with UIPageControl inside a UITableViewCell to be able to scroll horizontally (through a list of selectable images), but can’t find any raw examples that does what I want. I’ve gotten my scroll view “working”, but I am unsure how to go forward […]

In custom Prototype Cell in UITableView, UITextField value replaces with other Prototype Cell

I have taken one UITableView and inside that I have used 2 prototype cells, now in those prototype cells, i have taken 1 UITextField. Now when I run the app and enter value in first prototype cell then i scroll UITableView, then first prototype cell’s textfield value come to last prototype cell’s textfield value. so […]

cell.detailTextLabel.text not working… why

Using the following code I am getting the text.label but not the detailTextLabel.text. The NSLog is displaying correctly. cell.textLabel.text = [eventLabels objectAtIndex:indexPath.row]; cell.detailTextLabel.text = [eventFields objectAtIndex:indexPath.row]]; NSLog(@”%@”, [eventFields objectAtIndex:indexPath.row]); I also tried… cell.detailTextLabel.text = [NSString stringWithFormat:@”%@”, [eventFields objectAtIndex:indexPath.row]]; I have not had problems with this before. Any suggestions? John

Cannot freeze the table header while scrolling the rows?

Possible Duplicate: Some Gap remains between Table Top and Table Header only when table loads and scrolled down to the last row? I am using Xcode. self.mytable.tableheaderview=label; By this code I can get the header but I can not freeze it…plz help

UINavigationController popViewControllerAnimated: crash in iOS 6

The code below works fine in iOS 4 and 5 but crashes in iOS 6 with EXC_BAD_ACCESS. I’d appreciate any help in troubleshooting it. This code is being called in a UITableViewController that handles my app’s search logic: CATransition *transition = [CATransition animation]; transition.duration = 0.3f; transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; transition.type = kCATransitionFade; [self.navigationController.view.layer addAnimation:transition […]

Application tried to present modally an active controller

I have searched for and found various q/a on this error, but have not been able to find any specific help for my issue (at least that my minimal experience allows me to understand). I am loading a UIView from the app’s main menu, which in turn has several button options (call it submenu). One […]

How to put a UITextField inside of a UITableViewCell (grouped)?

How to put a UITextField inside of a UITableViewCell (grouped)? I want a user to be able to edit it.

UITableView Custom Cells Disappearing content after Scrolling

I have seen this being asked here many times but none of the solutions worked for me. Here is my code snippet: – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellClassName = @”DemoTableViewCell_sched”; DemoTableViewCell_sched *cell = [tableView dequeueReusableCellWithIdentifier:CellClassName]; if (cell == nil) { NSArray *topLevelItems = [cellLoader instantiateWithOwner:self options:nil]; cell = [topLevelItems objectAtIndex:0]; } […]

Xcode 4.5 corrupting XIBs?

i am using the new xcode 4.5, i have this lines of code on some view controller: DiscoverCell* cell=[table dequeueReusableCellWithIdentifier:@”DiscoverCell”]; if(cell==nil){ NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@”DiscoverCell” owner:self options:nil]; cell = [nib objectAtIndex:0]; } when i run the app its throwing: Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘The NIB data is invalid.’ on […]