Search Results

Search found 655 results on 27 pages for 'uitableviewcell'.

Page 12/27 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Adding a subview to UITableCellView

    - by hanno
    I want to add a subview to my UITableCellView subclass. However, non of the provided views in the class seem to be able to do exactly what I was looking for. I basically want to add my own background view, filling the whole cell. However, if I replace the backgroundView, the style from the grouped table view layout isn't displayed anymore. If I add a subview to backgroundView, the subview is not shown at all. If I add a subview to the contentView, I can't draw behind the accessory icon. What am I missing?

    Read the article

  • UITableViewController not redrawing new cell text label after popViewControllerAnimated

    - by crunchyt
    I have a problemetic UITableViewController fails to redraw an updated cell after a child view is removed. Here's what's happening. After changing data in a child view, the parent view controller reloads the source data array and runs [tableView reloadData] via a PostNotification. After this triggers, I use popViewControllerAnimated to return to the parent UITableViewController (this pops the child view off the stack, and reveals the controller one level up). However, my updated data does not appear in the parent view controller! According to the debugger, the cell's label has been updated, but the visible label does not change. However, if I scroll-flick the table, momentarily moving the updated cell out of view, when it reappears the label is updated! I also try calling [tableView reloadData] via viewWillAppear but the issue still persists. Here is some additional info that may be helpful. I have a 3 views structured like this: 1/ SettingsViewController : UITableViewController 2/ -- UserView : UITableViewController 3/ ---- UserDetailsView : UIViewController <UIActionSheetDelegate> I am calling UserDetailsView from inside UserView as follows: UserDetailsView *userDetailsView = [[UserDetailsView alloc] init]; [self.navigationController pushViewController:userDetailsView animated:YES]; If I return to the top-most controller (SettingsViewController) and then load the problematic controller (UserView), everything is drawn correctly. It is only when returning from a child view that this issue occurs. Thank you in advance for your suggestions.

    Read the article

  • Need advice on speeding up tableViewCell photo loading performance

    - by ambertch
    I have around 20 tableview cells that each contain a number (2-5) thumbnail sized pictures (they are VERY small Facebook profile pictures, ex. http://profile.ak.fbcdn.net/hprofile-ak-sf2p/hs254.snc3/23133_201668_2989_q.jpg). Each picture is an UIImageView added to the cell's contentview. Scrolling performance is poor, and measuring the draw time I've found the UIImage rendering is the bottleneck. I've researched/thought of some solutions but as I am new to iphone development I am not sure which strategy to pursue: preload all the images and retrieve them from disk instead of URL when drawing cells (I'm not sure if cell drawing will still be slow, so I want to hold off on the time investment here) Have the cells display a placeholder image from disk, while the picture is asynchronously loaded (this seems to be the best solution, but I'm currently not sure exactly how to do best do this) There's the fast drawing recommendation from Tweetie, but I don't know that will have much affect if it turns out my overhead is in network loading (http://blog.atebits.com/2008/12/fast-scrolling-in-tweetie-with-uitableview/) Thoughts/implementation advice? Thanks!

    Read the article

  • TableView Cells Use Whole Screen Height

    - by Kyle
    I read through this tutorial Appcelerator: Using JSON to Build a Twitter Client and attempted to create my own simple application to interact with a Jetty server I setup running some Spring code. I basically call a get http request that gives me a bunch of contacts in JSON format. I then populate several rows with my JSON data and try to build a TableView. All of that works, however, my tableView rows take up the whole screen. Each row is one screen. I can scroll up and down and see all my data, but I'm trying to figure out what's wrong in my styling that's making the cells use the whole screen. My CSS is not great, so any help is appreciated. Thanks! Here's my js file that's loading the tableView: // create variable "win" to refer to current window var win = Titanium.UI.currentWindow; // Function loadContacts() function loadContacts() { // empty array "rowData" for table view cells var rowData = []; // create http client var loader = Titanium.Network.createHTTPClient(); // set http request method and url loader.setRequestHeader("Accept", "application/json"); loader.open("GET", "http://localhost:8080/contactsample/contacts"); // run the function when the data is ready for us to process loader.onload = function(){ Ti.API.debug("JSON Data: " + this.responseText); // evaluate json var contacts = JSON.parse(this.responseText); for(var i=0; i < contacts.length; i++) { var id = contacts[i].id; Ti.API.info("JSON Data, Row[" + i + "], ID: " + contacts[i].id); var name = contacts[i].name; Ti.API.info("JSON Data, Row[" + i + "], Name: " + contacts[i].name); var phone = contacts[i].phone; Ti.API.info("JSON Data, Row[" + i + "], Phone: " + contacts[i].phone); var address = contacts[i].address; Ti.API.info("JSON Data, Row[" + i + "], Address: " + contacts[i].address); // create row var row = Titanium.UI.createTableViewRow({ height:'auto' }); // create row's view var contactView = Titanium.UI.createView({ height:'auto', layout:'vertical', top:5, right:5, bottom:5, left:5 }); var nameLbl = Titanium.UI.createLabel({ text:name, left:5, height:24, width:236, textAlign:'left', color:'#444444', font:{ fontFamily:'Trebuchet MS', fontSize:16, fontWeight:'bold' } }); var phoneLbl = Titanium.UI.createLabel({ text: phone, top:0, bottom:2, height:'auto', width:236, textAlign:'right', font:{ fontSize:14} }); var addressLbl = Titanium.UI.createLabel({ text: address, top:0, bottom:2, height:'auto', width:236, textAlign:'right', font:{ fontSize:14} }); contactView.add(nameLbl); contactView.add(phoneLbl); contactView.add(addressLbl); row.add(contactView); row.className = "item" + i; rowData.push(row); } Ti.API.info("RowData: " + rowData); // create table view var tableView = Titanium.UI.createTableView( { data: rowData }); win.add(tableView); }; // send request loader.send(); } // get contacts loadContacts(); And here are some screens showing my problem. I tried playing with the top, bottom, right, left pixels a bit and didn't seem to be getting anywhere. All help is greatly appreciated. Thanks!

    Read the article

  • BackgroundColor of UITableViewCellStyleSubtitle labels ??!?

    - by P5ycH0
    I am trying to create a table with an image as a background. To achieve this, I started out with the background: self.view.backgroundColor = [UIColor groupTableViewBackgroundColor]; This resulted in a background image which appears in tablecells as well. That is not something I want, so I tried to set the cell's backgroundColor: cell.backgroundColor = [UIColor whiteColor]; This had no effect at all !!!. Hmmm strange. So I tried this: UIView *backgroundView = [[UIView alloc] init]; backgroundView.backgroundColor = [UIColor whiteColor]; cell.backgroundView = backgroundView; [backgroundView release]; This works almost. The only problem left is that the textLabel & the detailTextLabel still show the background behind them. Setting the backgroundColor on those labels to white doesn't do anything either. How do I proceed? Where do I go wrong? I am trying to achieve a tableView like the worldClock app has.

    Read the article

  • iPhone Table View Cell Image: Working on simulator, not showing on real device

    - by Graeme
    Hi, I have a UITable View that displays an image in the left hand side of the table cell, and it works fine in the simulator. Only problem is, once I ran it on my device no images appear. At first 3 did, but then I "cleaned headers" and now none appear. Have checked that images are added to resource folder for build (which they are) and that capitals etc. match (which they do). Any ideas? Thanks. Code to display images: cell.imageView.layer.masksToBounds = YES; cell.imageView.layer.cornerRadius = 5.0; UIImage *image = [UIImage imageNamed:[[dog types] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]];; if ( image ) { cell.imageView.image = [image imageScaledToSize:CGSizeMake(50, 50)]; }

    Read the article

  • Setting UIImage dimensions on UITableViewCell image

    - by bbrown
    I've got a standard UITableViewCell where I'm using the text and image properties to display a favicon.ico and a label. For the most part, this works really well since UIImage supports the ICO format. However, some sites (like Amazon.com say) have favicon.icos that make use of the ICO format's ability to store multiple sizes in the same file. Amazon stores four different sizes, all the way up to 48x48. This results in most images being 16x16 except for a few that come in at 32x32 or 48x48 and make everything look terrible. I have searched here, the official forum, the documentation, and elsewhere without success. I have tried everything that I could think of to constrain the image size. The only thing that worked was an undocumented method, which I'm not about to use. This is my first app and my first experience with Cocoa (came from C#). In case I wasn't clear in what I'm looking for, ideally the advice would center around setting the dimensions of the UIImage so that the 48x48 version would scale down to 16x16 or a method to tell UIImage to use the 16x16 version present in the ICO file. I don't necessarily need code: just a suggestion of an approach would do me fine. Does anyone have any suggestions? (I asked in the official forum as well because I've sunk more than a day into this already. If a solution is posted there, I'll put it here as well.)

    Read the article

  • Reuse nib's across multiple UIViewControllers

    - by colm
    I've created some custom UITableViewCells in a nib file and would like to use that across multiple UIViewControllers. Can anyone tell me the best practice way to do that? My limited knowledge around loading nibs seems to suggest that you have to specify a single owner class in Interface Builder. Thanks.

    Read the article

  • First Tap on customcell of uitableview should expand it and second should contract it.

    - by neha
    Hi all, In my application I have this requirement that first tap on custom cell of uitableview with a label in it should expand it and second should contract it. I'm able to expand and contract cell and expand label inside cell, but not able to contract the label on second tap. I'm using this function - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; if( selected == YES ) { [self expandRow]; } else { [self contractRow]; } height = [lblFeed frame].size.height + 75; } expandRow expands the label and contractRow contracts it. I'm perplexed as for how many rows this function gets called. It doesn't get called only for the cell tapped, it gets called more number of times for single tap on single cell may be for other cells but I'm not getting which rows. This' really urgent. Can anybody please help?

    Read the article

  • Table image not showing, "Pop an autorelease pool" error

    - by Graeme
    hi, I have a UITableView which uses the following code to display an image in a Table View cell: cell.imageView.layer.masksToBounds = YES; cell.imageView.layer.cornerRadius = 5.0; UIImage *image = [UIImage imageNamed:[[color types] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]]; if ( image ) { cell.imageView.image = [image imageScaledToSize:CGSizeMake(50, 50)]; } It works fine on the iPhone simulator, but when I try it on a real iPhone the iPhone doesn't show. Instead in the console in debugging mode, I get this error: attempt to pop an unknown autorelease pool (0x851e00) Any help would be great, thanks.

    Read the article

  • Getting Tap/Touch Position when selecting a TableView cell

    - by Omer
    Hi, hope to get some help here because this is something that really makes me mad... I have a view with a tableView, and when I tap a cell I want to present a popOver window pointing the arrow to the cell I tapped. the things that I think I need is: 1- the position of the cell in the screen (not in the view, because on large tables the Y value of the cell's rect could be grater than screen hight) or 2- a CGPoint or something similar that represents the point in the screen I tapped. I can't figured this out, and makes me really mad!!! Any help will very very very very usefull. Have a nice day.

    Read the article

  • Displaying html in a table view cell

    - by Surya
    I am working a rss reader app for iphone . What are my options for displaying entry summary in rss feed ( which could be html) in a tableviewcell without compromising scroll performance . I dont control the feed so html in summary section is out of my control . I am thinking of uiwebview would be my last option ( so rss feeds have images and stuff in there, unfortunately ) . I was thinking if there was a way to extract summary text from html.

    Read the article

  • Push different views from a table.

    - by Tanner
    Hello All, Ive been following a tutorial to implement a search bar ( http://www.iphonesdkarticles.com/2009/01/uitableview-searching-table-view.html ) However I cant seem to push different views. Here is what my didsSelectRowAtIndexPath looks like. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSString *selectedCountry = nil; if(searching) selectedCountry = [copyListOfItems objectAtIndex:indexPath.row]; else { NSDictionary *dictionary = [listOfItems objectAtIndex:indexPath.section]; NSArray *array = [dictionary objectForKey:@"Countries"]; selectedCountry = [array objectAtIndex:indexPath.row]; } //Initialize the detail view controller and display it. if ([[listOfItems objectAtIndex:indexPath.row] isEqual:@"neon"]){ Neon *abo = [[Neon alloc] initWithNibName:@"Neon" bundle:nil]; //dvController.selectedCountry = selectedCountry; [self.navigationController pushViewController:abo animated:YES]; [abo release]; } } And here is the debuger message when I click on neon: 2010-05-09 08:47:27.516 iTeachU[3821:307] * Terminating app due to uncaught exception 'NSRangeException', reason: ' -[NSMutableArray objectAtIndex:]: index 60 beyond bounds [0 .. 0]' ** Call stack at first throw: terminate called after throwing an instance of 'NSException' Program received signal: “SIGABRT”. If anyone has a way to push views based on the cells text it would be greatly appreciated. Thanks

    Read the article

  • iPhone Advanced table view cells example

    - by Rob
    I have been going through and re-creating Apple's "Advanced Table View Cells" example to better understand everything. I have done everything, but somehow missed one detail and I can't figure it out. If you launch their example (http://developer.apple.com/iphone/library/samplecode/AdvancedTableViewCells/Introduction/Intro.html) and open up the RootViewController.xib file, they have a "tableView" outlet on the inspector that is linked to File's Owner. For whatever reason, I can't get that to show up on my version. My code is almost verbatim of Apple's, so what am I missing? Did I not declare that somewhere or doesn't that get taken from the RootViewController.m file?

    Read the article

  • What is the proper way to align UITableViewCells when only some have an imageView?

    - by Topher Fangio
    Hello all, I am new to iPhone programming and working on my first real application (i.e. one not written in a book or online) and I've run into a small problem which I could solve a multitude of ways, but feel like there should be a good solution that perhaps I am just missing. Here is the scenario: I have a UITableView with a bunch of standard UITableViewCells in it. What I want to do is toggle a green check mark when the cell is selected and I have that part working (note: I'm already using the accessoryType for something else, so I can't use it for the checkmark...besides, it's not as pretty). Unfortunately, when I toggle the checkmark like so: if (...) { cell.imageView.image = [UIImage imageNamed:@"checkmark.png"]; } else { cell.imageView.image = nil; } It makes the cell's label bounce back and forth depending on whether it is checked or not. What is the proper way to align the cell's text (set via cell.textLabel.text) regardless of whether or not it has an image set? The solutions I have come up with are: Create a blank 40x40 png image in Photoshop and set the unchecked to that Create a blank 40x40 image solely in code Set some setting that I don't know about that will align it for me Create a subclass of UITableCellView that does what I need (which would be stupid, I'd just go with option 1...) Suggestions? Thoughts? Comments? Thank you very much :-) P.S. I'd like the solution to work with OS 3.0 and 4.0 if that makes any sort of difference.

    Read the article

  • Problem creating checklist (similar to TouchCells sample code) app for iPhone. Random cells get chec

    - by Jonah
    I've been having a problem creating a checklist in the style of the TouchCells example from the Apple sample code. Basically, it is a table that allows multiple selection of its items and gives each selected item a check mark. The problem I'm having is that when I select an item and then scroll down the screen, another item (off the screen) will randomly be selected. It seems that it is usually the next cell to be loaded on the screen. I couldn't figure out what I was doing wrong so I tested it with Apple's TouchCells code. In their program though, they only have 6 cells and there is no room to scroll. So, I duplicated some of the items from the plist file to make more cells and... the same problem pops up. If you select a cell and then scroll, another cell will randomly be selected. Update I recently tried the iPhone Dev Cookbook sample code named "Checks" and... you guessed it, the same problem. Here's the link: http://code.google.com/p/cookbooksamples/downloads/list This is driving me nuts. Is it a bug or am I doing something wrong? Does anyone know how to fix this? Thanks! Also, does anyone know of any sample code that shows how to do this?

    Read the article

  • UITableView and UITableCellView, how does this work with core plot ?

    - by Luc
    Hello, I'm very new to iPhone programming, and I'm currently following tutos to understand the whole thing. I've been able to do what I needed (retrive data from a JSON http server, parse them with YAJL and plot the data in core plot). I have done this in a "simple" view where I have added a UILayerHostingView as requested by core-plot. I am now trying to follow this tuto: http://blogs.remobjects.com/blogs/mh/2010/01/26/p973 but I am missing the first part regarding the views... My understanding is that I need to create a view with a UITableView first. Then add a UITableCellView to make the first cell be able to contain the graph ? Is this right ? Where does the method "(id)initWithStyle:(UITableViewCellStyle)style" come from ? For my needs, only the first cell needs to contain a graph, I will put some other info in the other cells. As for now, I have created a new GraphListViewController, in the corresponding view I have added a listview but I do not see any auto generated methods regading cell customisation ? Do I need to implements DataSource in this controller and manually add some customisation methods ? Do I need to add a UITagbleViewCell to this UITableViewTable within IB ? Hope I am not getting to confusing... Thanks a lot for your help, Best Regards, Luc

    Read the article

  • UITableViewCells of different heights place their accessoryViews at different X positions

    - by Jasarien
    Hey Guys, My app has some table cells that vary in height. The cells can also have a UIButton set to be a detail disclosure button (round, blue with arrow) as their accessory view. Depending on the height of the cell, the accessory view is positioned differently. At first I thought it was my layout code for my cell that was causing the problem, so I set up a quick independent test that uses vanilla UITableCells to remove the possibility that it could be my fault. I set up a view in interface builder, and just added a view table cells to the view, set their heights to different values and then added a detail disclosure button to each. Nothing more, nothing less. This is what I see: I added the size guides (thanks to Xscope) so you can see the difference in the accessory view x positions. The heights are: top 37px mid 68px bottom 44px (default, untouched height) If I increase the height any heigher than 68px the accessory view doesn't move any further to the left. Is this a bug? Is there any way I can prevent this from happening?

    Read the article

  • performSelectorInBackground: using self.object ?

    - by Emil
    Hey. I am trying to load an image for a custom tableViewCell. The code gets run from the CustomCell-class (CustomCell.h) from [cell performSelectorInBackground:@selector(loadImageFromURL:) withObject:[NSURL URLWithString:urlString]]; in the cellForRowAtIndexPath:-function. Cell gets created here: CustomCell *cell = (CustomCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil){ NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil]; for (id currentObject in topLevelObjects){ if ([currentObject isKindOfClass:[CustomCell class]]){ cell = (CustomCell *) currentObject; break; } } } CustomCell.h: // ... IBOutlet UIImageView *cellImage; } - (void) loadImageFromURL:(NSURL *)url; // … CustomCell.m: - (void) loadImageFromURL:(NSURL *)url { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSLog(@"Loading image..."); [loadingImage startAnimating]; [self.cellImage setImageWithURL:url]; [loadingImage stopAnimating]; NSLog(@"Done loading image..."); [pool release]; } setImageWithURL: is a function from the SDWebImage-framework that rs has made. The real error is that the image doesen't show up. EDIT: When I cleared the app's cache, the images didn't show up anymore. EDIT: Seems like URL is nil for some reason. Am I passing the object in the selector correctly? Can you see anything wrong? Thanks.

    Read the article

  • button inside table view cell shows highlighted state on tapping on cell

    - by Vivek Dandage
    Hi there! I have an issue with the background image of button which is dependent of button state. I have a button inside customized table view cell and i have set different images for button's different states. Please look into the code below. [btnNow setImage:[UIImage imageNamed:@"now_norm.png"] forState:UIControlStateNormal]; [btnNow setImage:[UIImage imageNamed:@"now_focus.png"] forState:UIControlStateHighlighted]; Whenever i tap on the actual button this works great but if i tap on area outside of button but which is still inside that same cell then this button changes its background image from UIControlStateNormal to UIControlStateHighlighted. If i remove background image from UIControlStateHighlighted state then this issue doesn't exists but i need pressed state of the button. Please help me out. Thanks in advance! Vivek Dandage.

    Read the article

  • iPhone NSString drawAtPoint linebreakmodeWordWrap

    - by hecta
    Hello, Since I had a very slow scrolling tableView I'm now trying to catch up with the direct draw method, similiar to the Tweetie App sample or Apples TableViewSuite code. So right now I'm struggling to draw NSString with more than one line. I'm using the [NSString drawAtPoint: forWidth: withFont: linebreakMode:] method, and it "breaks" the line, but it doesn't show the second line, it just cuts the rest of the string off. Is this a normal behavior and what can be the solution to multiple lines?

    Read the article

  • Changing custom cell appearance when entering editing mode

    - by Nava Carmon
    Hi, I have a table with custom cells, that I built in IB. When entering editing mode, content of all cells is moved to show delete edit control. My question is where can I adjust the cell appearance before entering editing mode? I saw that willBeginEditingRowAtIndexPath function is supposed to let adjust the UI, but seems I don't get there at all. Please help, TIA

    Read the article

  • Trying to retrieve the contents of UITableView cell on selection by user.

    - by chubsta
    Hi, this is my first post here and as i am very new (2 weeks in...) to iPhone (or any!) development i am a little unsure as to how much detail is needed or relevant, so please forgive me if I dont provide enough to be useful at this stage... Anyway, on to my problem - I have set up a UITableView-based app, which has a .plist for holding the data. The .plist has a dictionary as its root, followed by a number of Arrays, each containing the data-strings that display in the table. Everything is working fine until the point where i select a row. I have set it up so i get an alert with the results of the button press and it is here that i want to see the contents of the cell being produced. Instead of the expected string eg. "data line 1", all i get is the number of the row within the section. I have gone backwards and forwards but dont seem to be getting anywhere although i am sure it is something simple. The code compiles fine, with no warnings or errors, and if i can just get the string of the selected cell i will be well on my way, so any help appreciated. I know that I need to do more following the 'NSUInteger row = [indexPath row]; part but thats where my mind dries up... here is the relevant 'selection' section, if i need to post more code please let me know, and i really appreciate any help with this...(please forgive my 'alert' message, i was just happy at that point that i get SOMETHING back from the row selection!) (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; NSUInteger row = [indexPath row]; NSString *message = [[NSString alloc] initWithFormat: @"You selected Cell %d from this Section, "@"which is a very good choice indeed!" @"Unfortunately I can't work out how to get the info out of the cell so it's not much use at the moment!" @"Still, this is a good chance to see how much space I have in an alert box!", row]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"My God! It works..." message:message delegate:nil cancelButtonTitle:@"You are awesome Karl!!" otherButtonTitles:nil]; [alert show]; [message release]; [alert release]; }

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >