uitableviewdatasource

Rearranging rows in uitableview

I've an application in which each row contains an uiimageview and an uibutton. I have created them using custom cells, uitableviewcells. The button is to trigger the method, uiimagepickercontroller to pick an image from the library and show it in the imageview. I need that any user who uses the application can rearrange the rows as they ...

Refreshing XML data and updating a UITableView

I'm developing an iPhone application which uses a TableView to display XML data. The XML data comes from an external resource and is parsed and put into an object for use as a table dataSource. The application uses a UITabBar and multiple ViewControllers all programmatically created and using the same dataSource. Everything is fine and ...

UITableView isn't refreshing properly after changing dataSource

I have a UITableView with several datasources. This is because, I need to switch the data with a UISegmentedControl, and if I add them as subviews, I cannot use the statusBar to scroll up, etc. At first, I show a login screen: self.tableView.dataSource = loginTableView; self.tableView.delegate = loginTableView; [self.tableView reloadDa...

Date wise sectioning of a UITableView

Suppose I have a UITableViewController with an array "history" as data source. The array consists of an undefined number of NSDictionaries. Each dictionary contains the following keys: term (NSString), date (NSDate) and id (NSNumber). I would like to map the contents of the history array according to the date values each dictionary has,...

Why shouldn't a UITableViewController manage part of a window in Cocoa Touch?

I have a view that contains a UITableView and a UILabel which works perfectly as far as I can tell. I really don't want to manage the UIView and UITableView with the same controller as the UITableViewController handles a lot of housekeeping and according to the documentation: If the view to be managed is a composite view in which a...

UITableView Crashes if Data Source Is Updated During Scrolling

I have an app wherein the datasource for a UITableView updates by a background thread from a remote server every 30 seconds. A crash occurs if the user is scrolling the tableView or if the tableView is in process of reloadTableView:. The reason for crash is that number of rows in table at the time of the crash doesn't match the number o...

App crashing when setting delegate and datasoruce

If I want to set my delegate and datasource for my uitableview my app crashes. What I'm doing wrong? - (void)loadView { NSLog(@"AddListViewController"); ShareListViewController *shareListViewController = [[ShareListViewController alloc] init]; UITableView *shareListView = [[UITableView alloc]initWithFrame:CGRectMake(100, 30, 100, ...

Using sectioned tables from an sqlite file with an iPhone uitableview

I am currently trying to make a sectioned table like this: Section 1: Entry 1 Entry 2 Entry 3 Section 2: Entry 4 Entry 5 Entry 6 Section 3: Entry 7 Entry 8 ... However, using this code: Event *lists = (Event *)[eventList objectAtIndex:indexPath.row]; accessStatement = "select * from DatabaseName"; [self findEvents]; // Code that b...

iPhone: Same Rows Repeated in Each Section of Grouped UITableview

I have an app that is a list of tasks, like a to do list. The user configures the tasks and that goes to the SQLite db. The list is displayed in a tableview. The SQL table in question consists of a taskid int, groupname varchar, taskname varchar, lastcompleted datetime, nextdue datetime, weighting integer. I currently have it working ...

how to use UISegmentedControl to change datasource in tableview

how to use UISegmentedControl to change datasource in tableview? with sql tables or read data from arrays thanks ...

iPhone: Crash When Deleting UITableView Rows

Hi, I am new in iPhone development. I am developing an application that fetches a value from a database and displays it in a table view. I want to delete table rows one by one but the rows do not delete and the application crashes. Here is my row deletion code: - (void)tableView:(UITableView *)tv commitEditingStyle:(UITableViewCellEd...

UITableView not getting populated

Hi. I have a peculiar problem. I created a normal Objective c class called SampleTable. I then extended UITableView instead of NSObject. Then in the initWithFrame constructor i initialized the table. I also made a NSMutableArray object for the datasource. I also conformed UITableViewDelegate and UITableViewDatasource. I have overridden t...

iPhone: UITableView not Displaying New Data After Call to reloadData

My problem is that the cell.textLabel does not display the new data following a reload. I can see the cellForRowAtIndexPath being called so I know the reloadData call goes thru. If I log the rowString I see the correct value so the string I set label text to is correct. What am I doing wrong? I have following code : - (UITableViewCell...

iPhone: Insert New Row at Row One of a Table View

I capture values from three text fields labeled to, from and message. When the user fills in these three text fields and hits a button, I need the values in these three textfield to be displayed in a new row 1 of a table view i.e. the new row should be the first row pushing the previously existing rows downward. How can I do this? Re...

Core Data grouping data in table

I am using core data trying to create a simple database app, I have an entity called "Game" which has a "creator". I have basically used the iPhone table view template and replaced the names. I have the games listed by creator. Currently the tableview looks like this... Chris Ryder Chris Ryder Chris Ryder Chris Ryder Dan Grimaldi Dan G...

iPhone - Change indentation row for a cell while editing.

Hi. I'm trying to change the indentation for a custom UITableViewCell's content (namely, a image, a button and a label) when a UITableView is being edited. I tried changing the cell's indentation width and level like this [cellToCustomize setIndentationLevel:1]; [cellToCustomize setIndentationWidth:20]; and it took me nowhere. I als...

UITableView -reloadSectionIndexTitles not calling data source

I'm trying to implement a UISearchBar within a UITableView, which behaves like the one in the "Artists" tab of the iPod application. I have it hiding the navigation bar, and resizing the search box to show the "Cancel" button, etc. but am unable to get it to hide the section index titles. - (void)searchBarTextDidBeginEditing:(UISearchB...

Displaying UIActivityIndicator while performing a SYNCHRONOUS download

I am downloading XML to populate an array used to build UITableView. Until I'm informed otherwise, I believe I have to completely download the array before I can display it in the table (also it's text only and extremely small, so it downloads in a reasonable time on the slowest possible connection). It does take about 3-5 seconds at it'...

Scrolling to Last Table View Cell Shows First Cell's Data

Hi! I am using UITableView with Griding Functionality. When scrolling, at the last column it automatically comes at First cell. What should I do to resolve this problem? ...

Retain count for tableView:cellForRowAtIndexPath:

In Apple's example code, the method tableView:cellForRowAtIndexPath: of a UITableViewDataSource returns a cell with a retain count of 1; it allocs it, but doesn't autorelease it. However, the static analyzer complains that this violates the Cocoa naming conventions, since the method name doesn't start with 'new', etc. The documentation d...