Search Results

Search found 1385 results on 56 pages for 'uitableview'.

Page 8/56 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Can't Reorder a UITableViewCell into _some_ empty sections of a UITableView

    - by Jeremy Lightsmith
    If I have a UITableView in edit mode, w/ reordering turned on, it seems I can't move some (but not all) cells into some (but not all) empty sections. For example, if I have this layout : Section 1 apple banana Section 2 doberman Section 3 Section 4 Then I can move 'doberman' into any slot in section 1 (except after 'banana'), but I can't move it into section 3 or 4 at all. On the other hand, I can move 'apple' & 'banana' into section section 2 (except after 'doberman'), and I CAN move it into section 3, but NOT into section 4. What gives? this seems like buggy behavior. How do people work around it? Is apple aware of this bug?

    Read the article

  • Refreshing a UITableView

    - by MihaiD
    I have a UITableView subclass and a UITableViewCell sublass that I'm using for cells. I'm bulding all my cells in advance and store them in an array from where I use them in cellForRowAtIndexPath. Aside from this I have a thread that loads some images in each cell, in the background. The problem is that the cells don't get refreshed as fast as the images are loaded. For example, if I don't scroll my table view, the first cells only get refreshed when all cells have been modified and the thread has exited. Any ideas on how I can effectively refresh my tableview/cell?

    Read the article

  • Accessory view in UITableView: view doesn't update

    - by Kamchatka
    I'm trying to add checkmarks to items when the user select rows in a table view. However, the view is not refreshed and the checkmarks do no show up: - (void)tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell* oldCell = [self tableView:tv cellForRowAtIndexPath:[NSIndexPath indexPathForRow:selectedIndex inSection:0]]; oldCell.accessoryType = UITableViewCellAccessoryNone; if (indexPath.section == 0) { selectedIndex = indexPath.row; } UITableViewCell* newCell = [self tableView:tv cellForRowAtIndexPath:indexPath]; newCell.accessoryType = UITableViewCellAccessoryCheckmark; [tv deselectRowAtIndexPath:indexPath animated:NO]; } What could be a reason for that?

    Read the article

  • Animating Reloading of UITableView

    - by ustun
    I am trying to animate table rows in a UITableView in an iPhone project as I swipe across the screen to reload the data. When I disable animations and only call reloadData, table continues responding to swipe gestures. When I add animations with the reloadSections:WithRowAnimation: method, table stops responding to swipes, and only the navigation bar at the top responds to swipes. Another change is that, table starts responding to selection and I have to manually disable it again. I suspect these two issues might be related. I am using the swipe detection code over here btw: 1

    Read the article

  • UITableView Animation when entering Editmode

    - by f0rz
    Hi! Maybe I´m just stupid but I cant understand why this isnt working. I want to achieve a little animation when I'm entering editing mode within a UITableView. [super setEditing:NO animated:YES]; [myTable setEditing:NO animated:YES]; [myTable reloadData]; [self.navigationItem.leftBarButtonItem setTitle:@"Edit"]; [self.navigationItem.leftBarButtonItem setStyle:UIBarButtonItemStylePlain]; Shouldnt this animated:YES suppose to animated this entering of the editmode? Regards. - f0rz

    Read the article

  • Different background colors for the top and bottom of a UITableView

    - by Aaron Brethorst
    If you look at your Inbox in iPhone OS 3.0's Mail app, you'll see that swiping down displays a grayish background color above the UISearchBar. Now, if you scroll down to the bottom of the table, you'll see that the background color at that end is white. I can think of a couple ways of solving this problem, but they're pretty hacky: Change the table view's background color depending on the current scrollOffset by overriding -scrollViewDidScroll: Give the UITableView a clear background color and then set its superview's backgroundColor to a gradient pattern image. Does anyone know what the "best practice" solution is for this problem? thanks.

    Read the article

  • UITableView loading before variables being set

    - by Sheehan Alam
    I have a label on a UITableView. When clicked it will refresh my tableview and set the top cell's height. When I am setting the cell height, I am checking if a certain variable is TRUE. If true it will show the large height, if false, the smaller height. At the time of cell height creation, my variable is always false. It is a member variable and its value is being set when the user clicks on the label. How can I make sure that the variable is set before the table refreshes?

    Read the article

  • UITableView Edit Indentation

    - by Or.Ron
    Hi, I'm building a pretty simple UITable in my app with custom cells that I'v created. The target language is hebrew. thats why all my tabels are right to left. Everything works fine until I'm changing the table to Edit mode. I'v successfully canceled the delete and the red accessory button becuase thay are in the oppisite direction but the cell get this tiny indentation to the right and part of my cell is not showed. I tried the return NO; to the function (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath (NSIndexPath *)indexPath but it didn't work. any suggestions ? thanks in advance

    Read the article

  • UITableView performance degrading after adding subviews on cell iphone sdk

    - by neha
    Hi all, In my application, I'm adding a label and two buttons on cell of UItableView [I have not created a separate cell class]. I'm adding these to cell and not cell.contentview. After I run my application on IPhone, the tableview cell rendering after I move the cells up-down, is very jerky. Is it because I'm not adding the views on cell.contentView or because I've not created a custom class for cell? Can anybody please help? Thanks in advance.

    Read the article

  • iPhone: Grouping records in multiple UITableView views

    - by Nic Hubbard
    Let me first say, I know how to create sections and group records within a UITableView. What I am wanting to do is something similar to creating a photo album. So, I have all my data objects coming from core data, and, I want to be able to create a custom group, such as "My Trip to Mexico" and "First Birthday". Then, the user should be able to add objects/records into new sections/albums. So, basically the user is creating custom sections with their own custom names, and then choosing what records should go into that section/album. So, I am just wondering what is the best way to do this? I am thinking that I would just create some extra attributes for my core data model. Or, would I create a whole new "Album Section" object, and somehow use that? Point me in the right direction. :)

    Read the article

  • How to set UITableView to Grouped?

    - by 4thSpace
    In an iPhone navigation based app, I want to add a second tableview but have its design available in IB. I've added a new empty XIB and dragged a UITableView onto it. I want to setup the layout through IB. I've created a controller for this tableview and set the File's Owner class in IB to this controller. I linked the tableview to File's Owner as well. I set the tableview to grouped in IB. However, that does not translate at runtime. I still have a plain tableview. In fact, none of the Inspector settings work at runtime. What have I missed?

    Read the article

  • Putting data from SONObjectWithData to UITableView

    - by user2966615
    i am building a app in which i am getting data from a php file and already NSLoging it in xcode and it is showing data in this format: jsonObject=( ( 1, abc, "[email protected]", "501 B3 Town" ), ( 2, sam, "[email protected]", "502 B3 Town" ), ( 3, jhon, "[email protected]", "503 B Town" ) ) and here is my viewdidload - (void)viewDidLoad { [super viewDidLoad]; statuses=[[NSMutableArray alloc]init]; NSURL *myURL = [NSURL URLWithString:@"http://url/result.php"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:myURL cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60]; [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { NSLog(@"Finished with status code: %i", [(NSHTTPURLResponse *)response statusCode]); id jsonObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; NSLog(@"jsonObject=%@",jsonObject); statuses = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error]; }]; } now i want to display all records in uitableview. can anyone tell me how can i do that. Thanks

    Read the article

  • UITableView cellForRowAtIndexPath occasionally not called?

    - by Tobster
    I'm developing a graphing application that on the main navigation/tab view displays a UIView that renders a graph using openGL. Beneath that view is a UITableView that displays the list of elements on the graph, and an add button. Occasionally, when the user clicks on another tab, and then returns to the graph view tab, the table view does not get redrawn. I have a [tableView reloadData] method being called in the navigation controllers' (also the table view's delegate and data source) viewDidAppear method. numberOfSectionsInTableView and numberOfRowsInSection get called, but cellForRowAtIndexPath does not despite both latter methods returning positive values. This is an intermittant problem, only happening some of the time, but it's not clear what (if anything) influences this. Does anyone have any ideas?

    Read the article

  • Weird Animation when inserting a row in UITableView

    - by svveet
    I have tableview which holds a list of data, when users press "Edit" i add an extra row at the bottom saying "add new" - (void)setEditing:(BOOL)editing animated:(BOOL)animated { [super setEditing:editing animated:animated]; NSArray *paths = [NSArray arrayWithObject: [NSIndexPath indexPathForRow:1 inSection:0]]; if (editing) { [[self tableView] insertRowsAtIndexPaths:paths withRowAnimation:UITableViewRowAnimationTop]; } else { [[self tableView] deleteRowsAtIndexPaths:paths withRowAnimation:UITableViewRowAnimationTop]; } } and of course the UITableView transform with animation, but weird thing is the row before the row that i just added, has different animation than all others. all rows perform "slides in" animation, but that 2nd last one did a "fade in" animation. and i didnt set any animation on the 2nd last row (or any other row), and if i didnt add the new row in, the animation slides in as normal when i switch to editing mode. somehow i cant find an answer, i check with contact app on my phone, it didnt have that weird animation as i have, when they adding a new row on editing mode. Any help would be appreciated. Thanks

    Read the article

  • UITableView: Need a liveUpdate (Huge amount of cells)

    - by antihero
    Hey all, I have a UITableView which shows some information. The informations are from a XMLFile. The Xmlfile is pretty big, about 500 entries. I don't want that the user has to wait until the parsing has finished, i want to add cell by cell to the TableView. Here's my code: -(void) onFinishedPartDownload:(id)item { if(odvTableViewDelegateController.odvs == nil) odvTableViewDelegateController.odvs = [NSMutableArray new]; if([odvTableViewDelegateController.odvs count]==0) { genericDelegate.tableView.delegate = odvTableViewDelegateController; genericDelegate.tableView.dataSource = odvTableViewDelegateController; } [odvTableViewDelegateController.odvs addObject:item]; [genericDelegate.tableView reloadData]; } This method is called everytime an item has parsed, but it reloads the tableView all at once at the end. I don't have my expected liveUpdate which i'm searching for. The intervall the method is called is about 0.001 to 0.0025 seconds. Any ideas to fix that? Sebastian

    Read the article

  • What's the best way to return different cells depending on position in a UITableView

    - by Robert Conn
    I have a grouped UITableView that has 3 sections and a number of cells in each section that each need to be a different custom cell, with different display requirements. I currently have a large if statement in cellForRowAtIndexPath, with each branch instantiating and returning the appropriate custom cell based on interrogating the indexPath's section and row properties. e.g. if (indexPath.section == 0 && indexPath.row == 0) { // instantiate and return cell A } else if (indexPath.section == 1 && indexPath.row == 2) { // instantiate and return cell B } //etc etc What is best practice for this scenario? A large if statement does the job, but is it the best implementation?

    Read the article

  • Invalidating UITableView contents

    - by Roman
    I have an application with several UITableViewControllers. Now, the user is allowed to change "Data source". In that case I need to invalidate (reset) data in the relevant UITableViews. I figured out, that I can use NSNotificationCenter and add these controllers as observers to events which will be generated when the data source changes. The question is, how do I reset the underlying tables? I can, of course, set some boolean flag, and call UITableView:reloadData in viewWillAppear or viewDidAppear, but I was wondering, if there's a cleaner way of doing it. Or perhaps I'm completely missing the point, and I don't need NSNotificationCenter altogether. Thank you very much in advance.

    Read the article

  • Problem implementing a UITableView that allows for multiple row selections

    - by wgpubs
    This - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; int cardNumber = indexPath.row + 1; if (cell.accessoryType == UITableViewCellAccessoryNone) { cell.accessoryType = UITableViewCellAccessoryCheckmark; if (![self.winningNumbers containsObject:[NSNumber numberWithInt:cardNumber]]) [self.winningNumbers addObject:[NSNumber numberWithInt:cardNumber]]; } else { cell.accessoryType = UITableViewCellAccessoryNone; if ([self.winningNumbers containsObject:[NSNumber numberWithInt:cardNumber]]) [self.winningNumbers removeObject:[NSNumber numberWithInt:cardNumber]]; } [tableView deselectRowAtIndexPath:indexPath animated:YES]; } ... modifies the "accessoryType" of every 6th cell INSTEAD of just the selected row. What am I missing? Thanks

    Read the article

  • Reranging a uitableview

    - by Nicolay
    Hallo @ All I ran into the same problem as desciped in http://stackoverflow.com/questions/1884491/crashing-while-trying-to-move-uitableview-rows! All I want to do is on specific reranging operations insert a new cell or delet the selected one! Sometimes I get a * Assertion failure in -[_UITableViewUpdateSupport _setupAnimationForReorderingRow], /SourceCache/UIKit/UIKit-963.10/UITableViewSupport.m:295 Attempt to create two animations for cell exception and when I want to reload my data by calling [self.tableView reloadData] I get a * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)' This is quiet anoying! Is there anybody out there who knows how to handle this problem? Please help me!

    Read the article

  • UITableView with multiple selections

    - by NewDev
    I have a UITableView with multiple selections enabled. If I select items and scroll the list back and forth they are remembered and shown and selected (blue background). Using the didDeselectRowAtIndexPath and didSelectRowAtIndexPath I am able to keep my own array of selected items. That part works well. However, if I then use the sectionForSectionIndexTitle and jump to a letter, the selection appears to be forgotten - even indexPathForSelectedRows appears to have been reset and is now empty. My own array remembers that an item is selected and I can set the cell.selected in the cellForRowAtIndexPath but the instant I move the list it is forgotten again. Any ideas? Is this a bug, or how do you retain the selection list when jumping to a letter?

    Read the article

  • UITableView not showing background image.

    - by K.Honda
    I have a uitableview with 2 cells (custom tableviewcells) and a button for login. I made them programmatically. Now I want to put a background image behind the 2 custom cells and the button. I went into IB and put the image view on top of the tableview and then put a picture on it which I want as the background. Then I went into viewDidLoad and put this bit of code tblSimpleTable.backgroundColor = [UIColor clearColor]; to clear the tableviews background colour. It now looks like this: But the background does not appear. Does anyone know how to fix this? Thanks.

    Read the article

  • iPhone - Adding new sections and rows into UITableView

    - by Dev
    I have a UITableView to display a list of data. The list will contain images, so I am loading images with lazy loading. Now I don't want to load the whole list at a time. The loading should be like, first it should load some 10 records and when we scrolling down to the tableview, it should automatically load next 10 records as on. For this I need to add rows when I am scrolling to bottom. The tableview may contain different sections. So how can I add new rows and new sections at the end of the tableview while scrolling down?

    Read the article

  • I am getting duplicates in UITableView, cellForRowAtIndexPath

    - by Martol1ni
    I am getting duplicates of my array, and wrongly displayed cells in this method: Here I am initializing the array, and adding it to the tableView: NSArray *sectionsArray = [NSArray arrayWithObjects: @"Location", @"Front Post", @"Front Fixing", @"Front Footplate", @"Rear Post", @"Read Fixing", @"Rear Footplate", @"Horizontal Bracing", @"Diagonal Bracing", @"Front Beam", @"Front Lock", @"Rear Beam", @"Rear Lock", @"Guard", @"Accessories", @"Comments", @"Off load ref", @"Loc Empty", @"Loc Affected", nil]; [_tableArray setObject:sectionsArray atIndexedSubscript:2]; [_tableView reloadData]; For some weird reason there are always the 4th object that is messed up, and is either duplicated, or do not have the views from IB. Here is the cellForRowAtIndexPath: method: - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell; if (indexPath.section == 2) { cell = [tableView dequeueReusableCellWithIdentifier:@"EntryCell"]; cell.tag = indexPath.row; UILabel *label = (UILabel *)[cell viewWithTag:3]; [label setText:[[_tableArray objectAtIndex:2] objectAtIndex:indexPath.row]]; } return cell; } I have logged the string [[_tableArray objectAtIndex:2] objectAtIndex:indexPath.row], and it logs the right string.

    Read the article

  • UISearchBar in a UITableView

    - by petert
    I'm trying to mimic the behaviour of a table view like one in the iPod app for Artists - it's a sectioned table view with a section index on the right and with a search bar at the top, but initially hidden when view shown. I am using sdk 3.1.2 and IB, so simply dragged a UISearchDisplayController in to my NIB - it does wire everything up ready for searching. The problem starts because I'm adding the UISearchBar in to the first section of the UITableView, because if I understand correctly I must do this so I can jump to the search bar by touching the search icon in the section index directly? When the table view appears I see the search bar but it has resized and I now have a white block behind the section index at the top. It does'nt take the color of the UISearchBar's surround which interestingly is different to that shown in Interface Builder. Searching around, I did find a tip to add a small navigation bar and a UISearchBar in a UIView, then add this to the table view cell - this works.. BUT the color of the navigation bar's background is what you'd expect normally (gray), not the different color as noted above?! More interesting, if I click the search bar to start a search, then click Cancel, all is fixed!!! The background along the whole tableview cell when the search bar is, is the same!!?! Thanks for any tips.

    Read the article

  • UISegmentedControl with UITableVIew NSRangeException

    - by Vivas
    Hi, I am using one UIViewController as shown: @interface RssViewController : UIViewController <UITableViewDataSource,UITableViewDelegate,BlogRssParserDelegate> I am displaying an RSS feed in the UITableView (in RssViewController) depending on the segment selected on the UISegmentedControl. My app crashes when I scroll the tableview then select another segment of the UISegmentedControl. For example I have two RSS feeds by default I am displaying the RSS feed at segment 0. This feed has 36 rows. The RSS feed that I load at segment 1 has only 5 rows. When I scroll the RSS feed at segment 0 THEN before the scrolling stops I switch to the RSS feed at segment 1 I crash the app with the following error: * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray objectAtIndex:]: index (36) beyond bounds (0)' If I wait till the scrolling on the RSS feed at segment 0 stops THEN select segment 1, everything works fine. How can I stop this crashing? I wanted to reuse the same tableview because only the data changes. I can see that it is crashing because of the row count - I went from 36 rows down to 5 rows BUT how can I fix this? Any help / suggestions would be appreciated.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >