Search Results

Search found 1119 results on 45 pages for 'tableview'.

Page 40/45 | < Previous Page | 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • iPhone SDK - Display more information about a selected CustomCell (custom UITableViewCell)

    - by Pittor
    If got a CustomCell loaded using: NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:nil options:nil]; I have no problems with the tableview but when I select a row I want display more information on that row(like facebook app)... using the typical "show more". At the beginning the row show "title" and "description". When I select that row i want to show "title", "description" and a webview... and, of course, make the row bigger to accommodate that objects. Maybe changing this CustomCell by another bigger CustomCell? I have no idea where to start. Thanks. Sorry for my english :S

    Read the article

  • iPhone programming guideline : List / detail / modify

    - by Oliver
    Hello, I have a program that displays a list (a TableView). When the user clicks an item, it's detail is shown. On the detail view, the user can ask to modify it so a modify window is shown. Here, the user can ask to delete the item. I would like at this time return to the list with the item deleted from the list and from the data source. There may be thousands of methods to do this, but I wonder which is the best / good one. Could you help me, and/or give me a good reference to read about this ? Thank you.

    Read the article

  • UITableView scrollable background , UITableViewCell transparency

    - by f0rz
    Hi! In my UITableView I have custom cells. My UITableView have a repeatable background myTableView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed: @"backg.png"]]; I set my cells to have their background (clear); UIView *backView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease]; backView.backgroundColor = [UIColor clearColor]; cell.backgroundView = backView; This makes the cell have the same background as the TableView.. Problem is; That seems that every cell loads myTableView.backgroundColor once again. And the background are not being repeatble as it should. I want to have the cells totally with no background at all, instead they loads up myTableView.backgroundColor once again. Here is one example. Can anyone help me?

    Read the article

  • How to detect tap on uiview with lots of controls?

    - by kodcu
    My problem is about tap detection. I have a uiviewcontroller and there are some controls on uiview (labels, buttons, tableview, imageview, etc..) When I tap the uibutton I display a small uiview (200x150), if the user taps the uibuttons in smallview I hide the smallview. But I can't hide the uiview if the user taps the background. I tried this code.. -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ //NSLog(@"Touches began."); [self hideShareView]; } It doesn't work if I tap the another button in the uiviewcontrols view. I just want my uiviewcontrol's uiview to react first. I think its about firstResponder but I dont know how to set it first. edit: i want it to work like a uiPopover in ipad.

    Read the article

  • Locating the UIView that UITableView scrolls over

    - by Coocoo4Cocoa
    Hi all, I'm working on trying to obtain the UIView that UITableView scrolls over, if scrolling is enabled. Typically, the background is white, and if you push the UITableView out of its bounds, you'll see a background. I'm trying to set this background to a UIColor of blackColor. I can't seem to find the appropriate one to tag. I've tried the following code in my UIViewController: - (void)loadView { [super loadView]; UITableView *aTableView = [[[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain] autorelease]; [aTableView setScrollEnabled:YES]; [self.view setBackgroundColor:[UIColor blackColor]]; [self.view addSubview:aTableView]; self.tableView = aTableView; } The color still stays white. Seems I'm hitting the wrong UIView. Any idea? 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

  • Adding a subview larger than cellHeight to a UITableViewCell?

    - by MathieuK
    I'm trying to add a subview to a UITableViewCell and the design that I'm working from demands that this particular subview (an image) needs to be larger than the actual UITableViewCell and thus partly overlap its siblings. So I've set up my table cell, generated my image and added it to the cell's contentView: // rowHeight for the UITableView is 45.0f UIImage *image = [self createCellThumbnail: someImage]; UIImageView *thumbView = [[UIImageView alloc] initWithFrame: CGRectMake(150, -5, 55,55)]; thumbView.transform = CGAffineTransformMakeRotation(0.1f); thumbView.image = image; cell.clipsToBounds = NO; cell.contentView.clipsToBounds = NO; [cell.contentView addSubview: thumbView]; While the image will 'overflow' into the cell below it, the top of the image is always clipped, as demonstrated here: http://imgur.com/WDsAx . Does anyone know if what I'm trying to do is possible with the current approach or should I just figure out a way to draw these images onto the UITableView after all the cells are drawn (it's a non-scrollable tableview, so that would work and be fairly easy).

    Read the article

  • iPhone: Waiting until selectrow animation finishes before pushing viewcontroller?

    - by Mike
    My code looks like this: NSIndexPath *ip = [NSIndexPath indexPathForRow:15 inSection:0]; [[self tableView] selectRowAtIndexPath:ip animated:YES scrollPosition:UITableViewScrollPositionMiddle]; // Pause needed here until animation finishes [[self navigationController] pushViewController:secondView animated:YES]; Right now it animates the scroll/selection of the row and pushes the view controller at the same time. What I would like it to do is wait until it finishes the scroll/selection and then push the view controller. Is there any possible way of doing this? Thanks

    Read the article

  • Is this the correct way to reloadData on a UITableView?

    - by Sheehan Alam
    I am trying to append objects to my data source and then reload the table. Is this the correct way of approaching it? self.items is my datasource //Copy current items self.itemsCopy = [self.items mutableCopy];//[[NSMutableArray alloc] initWithArray:self.items copyItems:NO]; NSLog(@"Copy Size before append: %d",[itemsCopy count]); //Get new items int lastMsgID = [self getLastMessageID]; [self.coreData getMoreMessages:self.title lastID:lastMsgID]; //This will update self.items with 30 objects //Append new items [itemsCopy addObjectsFromArray:self.items]; //Empty items and copy itemsCopy [self.items removeAllObjects]; self.items = [self.itemsCopy mutableCopy]; NSLog(@"Actual Size after append: %d",[self.items count]); //Reload data [tableView reloadData];

    Read the article

  • Grouped UITableView's cell separator missing when setting backgroundView with an image

    - by Howard Spear
    I have a grouped UITableView with a custom UITableViewCell class and I am adding a custom background image to each cell. However, when I do this, the cell's separator is not visible. If simply switch the table style to Plain instead of Grouped, the separator is showing up. I need the grouped table - how do I make the separator show up? Here's my code: @interface MyCustomTableViewCell : UITableViewCell @end @implementation MyCustomTableViewCell // because I'm loading the cell from a xib file - (id)initWithCoder:(NSCoder *)coder { self = [super initWithCoder:coder]; if (self) { // Create a background image view. self.backgroundView = [[UIImageView alloc] init]; } return self; } // MyViewController - (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { // // standard cell dequeue + create cell code here // // // Configure the cell background now // UIImage *backgroundImage = [UIImage imageNamed:@"odd_row.png"]; if (indexPath.row % 2 == 0) { backgroundImage = [UIImage imageNamed:@"even_row.png"]; } UIImageView *backgroundView = (UIImageView *)cell.backgroundView; backgroundView.image = backgroundImage; }

    Read the article

  • Custom inputAccessoryView push my UITableView first row partially off the screen

    - by TonyMocha
    Hi For my scenario, I have a UITableView with a UITextField for the first row. While I try to set custom toolbar for keyboard with UITextField.inputAccessoryView, it pushed my first row of textfield partially off the screen. This is not happening if I avoid adding the toolbar. Refer screen shot below: I tried with NSNotification with keyboardWillShow by reposition to first row of the tableview, but it just look awkward for the table pulling out and in. It might be something to do overriding UITableView/UIScrollView, but I am out of idea how to do this. Would like to know how you guys resolve this. Thanks you!

    Read the article

  • UITableView - Loading data from internet

    - by Emil
    Hey. I have seen many apps that load data to UITableViews from the internet, and they usually load smoothly. Now it's my turn to load in that kind of data. I am getting different data at the same time, separating categories with ~ and pieces of categories with #. This works great, and I have managed to separate the data in obj-c perfectly. Everything in my app works, it's just that the loading takes a lot of time. So, I guess the real question is, how can you load in data for a tableView in the background, showing a label/UIActivityView or something while it is loading? Thank you.

    Read the article

  • Remembering state: content offset and table cell reuse.

    - by Attacus
    I have a tableview with cells that have a scrollview in them. The scrollview is paged, 2 pages to be exact, and is meant to be able to quickly compare two small blocks of text. I'm trying to find a way to remember what the content offset of the scrollview is. Cell reuse is killing me. I've tried resetting the offset in prepareForReuse or directly in the cellForRowAtIndexPath, but it seems to give me exactly what you'd expect: Randomly offset tablecells after reuse. Anyone have any ideas?

    Read the article

  • Google maps in iPhone - city & State name by Longitude & Latitude

    - by sugar
    I have developed an application in which the data About Schools are stored in ASP.NET Web Server. The database has following values. =School Name = Longitude of School = Latitude of School. Now, I retrieve all the data in iPhone through web-service & NSURLRequest. Now, Following is my Problem. When user Clicks on a school ( in tableView ). Google map should be load - ( i can do that ) A pin should be dropped at the place - ( i can do that ) A pin title should be with City & State name - ( i can't do ) Thanks in advance for helping me.

    Read the article

  • Core Data strategy using in memory cache, or no core data at all?

    - by randombits
    I have a user interface where the user can check off a bunch of items from a tableview, almost like a todo list. The items are populated from a Core Data stack. I need to be able to take all of the items they're clicking through and put them into a "temporary" shopping cart. Once they're in the shopping cart, users can go through the list and remove the items, or just submit them to a server. The thing is, the selected items are temporary just like an internet based shopping cart. It's nothing something that gets persisted once the application closes. Once the view is no longer in display, I can assume that the shopping cart is safe to discard. What's the best way to approach this? Since the user is essentially clicking on instances that map back to a Core Data entity .. should I setup a different persistence store such as in memory and add that store to my managed object context?

    Read the article

  • iOS UITableViewCell UIImageView setting on different conditions

    - by chis54
    I have an app that has a UITableView and in my Cells I have UIImageViews and UILabels that change images/textColors for a day theme and a night theme (trying to be automatically set). My issue is that I set the images and colors when the table is populated with cellForRowAtIndexPath and its during the day "theme", then if I reopen the app hours later in the night "theme" and the app is still in the "background" and not needing to be reloaded (ie viewDidLoad doesn't fire), the day "theme" shows until I scroll the UITableView and then the night "theme" shows when new cells are brought into view by scrolling. How should I set the objects in my cells when changing around time of the day? I was thinking to use an NSTimer, but I'm not sure how to update the objects in my cells. I was also thinking about using the appropriate methods in the AppDelagate to set things in motion, but is there a way to force reloading the TableView? Any suggestions?

    Read the article

  • UINavigationController doesn't fully push view and only changes the Navigation toolbar to the next v

    - by user284757
    So I have an iPhone application that utilizes a UINavigationController for setting up the views. When the application first starts, it presents the user with a UITableViewController and the user can select an item and it will push another view. Now I have it set so that my app remembers the user's last selection and automatically selects it and loads the correct view controller. The only problem is that I am experiencing a really weird glitch when I load the next view automatically.. When the view is pushed, the navigation toolbar will change so that a back button directed to the previous view is showing but it won't display the next view. It will instead keep showing the table view and I can interact with it as well. I can press the back button and it will change the toolbar back and the tableview is still shown. Then when I select an item it loads the view just fine. Thanks for the help.

    Read the article

  • How to find which method makes my iPhone app slow ?

    - by Stewart Hou
    Currently I am working on a production app. One function acts like the settings.app on iPhone. When the user click a cell of a tableView, as shown below http://www.penguintech.net/images/stackoverflow/1.png It will push another view, which includes a textfield to let user input something. However, on both simulator and device, after the app just loaded, the delay between clicking and showing the second view takes around 2 seconds. Then if user get back to previous view and click again, it will be no delay at all. To detect which method makes the delay, I put a NSLog() in every involved methods, but when I was inspecting the console while running the app, all NSLog() message showed in 0.1 seconds, and then still a delay on the app. Is there any other way to trace the performance footage of a app? The Instruments shows only CPU usage in Mac OS not in iPhone.

    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

  • shouldAutorotateToInterfaceOrientation not working for detail view

    - by TheLearner
    I am using Xcode's SplitView template as the base for my project and I only want to accept Landscape mode. I have implemented the method in the RootViewController and DetailViewController: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { switch (interfaceOrientation) { case UIInterfaceOrientationLandscapeLeft: return YES; } return NO; } However what happens is the app loads with in Landscape mode with the tableview on the left but the detail view is black / blank. How do I get the detailview to load properly and do I need to implement this method is all view controllers or just the root one?

    Read the article

  • Unable to Access UILabel in UITableViewCell

    - by Nirmal
    I am having trouble in accessing which is in the UITableViewCell, that i have placed in my main .xib file. That Label is connected to IBOutlet servicesCell. And the Label inside the table view cell is connected through IBOutlet serviceLabel. At runtime i am not getting the text which i am assining to that label. Following is my sample code for that. static NSString *ServiceIdentifier = @"ServiceIdentifier"; UITableViewCell *cell1 = [tableView dequeueReusableCellWithIdentifier:ServiceIdentifier]; if(cell1 == nil) { [[NSBundle mainBundle] loadNibNamed:@"servicesCell" owner:self options:nil]; cell1 = servicesCell; } // label access serviceLabel = (UILabel *)[cell1 viewWithTag:1]; serviceLabel.numberOfLines = 3; serviceLabel.lineBreakMode = UILineBreakModeWordWrap; [serviceLabel setTextAlignment:UITextAlignmentLeft]; [serviceLabel setText:@"Testing String"]; Anyone have any idea then please help.. Thanks in advance..

    Read the article

  • NSTableView doesn't populate with array objects until a new object is added via the controller

    - by Luke
    I have an NSTableView and an array controller set up as shown here, using cocoa bindings: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/TableView/PopulatingViewTablesWithBindings/PopulatingView-TablesWithBindings.html#//apple_ref/doc/uid/10000026i-CH13-SW3 In my app delegate during applicationDidFinishLaunching I have the following snippet in here, initialising the array and filling it with objects array = [[NSMutableArray alloc] init]; SomeObject* foo = [[Object alloc] init]; foo.text = @"sup"; [array addObject:foo]; //Repeat this a few times However, when I build the app and run it I end up with an empty table. However, if I bind a button to the array controller's add: input and click it during runtime (this adds a new object to the array and table) then the table will show the new object first, with the objects added during applicationDidFinishLaunching following it. Why does this happen? And is there a way to make my table populate without having to add an element first?

    Read the article

  • How to notify ViewController on parse end with multiple ViewControllers using a single parser.

    - by objneodude
    Hello, I have created a RSS parser and 3 TableViews and it parses the RSS files fine but I don't know how to notify the TableViewController when parsing has ended so it can update the view. The TableViewController initiates the parser and the parsing of a feed. parser = [[RSSParser alloc] initWithURL:@"http://randomfeed.com"]; I can access the single feed items like [parser feedItems]; In parser.m i have implemented the delegate methods of NSXMLParser: - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName - (void)parserDidEndDocument:(NSXMLParser *)parser So how do i get parserDidEndDocument to notify my controllers so i can add the data to the tableview. Cheers from a obj-c beginner.

    Read the article

  • Navigation Bar color doesn't change back? iOS7

    - by TKP
    I have several tableviews with navigation controller. The navigation bar is white for all the views except the last one, which is red. I have [[[self navigationController] navigationBar] setTintColor:[UIColor redColor]; in the viewDidLoad of the last tableview and [[[self navigationController] navigationBar] setTintColor:[UIColor whiteColor]; in the viewDidLoad of other table views. It works fine until I get to the last view and the color of the navigation bar changes to red. When I go back to the previous views, all the previous views' navigation bar has changed to red. Where should I put those codes so the color will remain unchanged? Thanks,

    Read the article

  • How to implement action in didSelectRowAtIndexPath of UITableview?

    - by Sumana Mehta
    On my view, I used to have few buttons and each button had an action associated with it. UIButton *testButton = [[UIButton alloc] initWithFrame:CGRectMake(120,300,90,90)]; [testButton setBackgroundImage:[UIImage imageNamed:@"test.jpg"] forState:UIControlStateNormal]; [testButton addTarget:self.view action:@selector(gotoProd:) forControlEvents:UIControlEventTouchUpInside]; [testButton addt [scrollView testButton]; But now I am trying to replace all those buttons with the tableview with rows. I was able to populate the rows and I know one needs to use didSelectRowAtIndexPath for handling on select event of the cell. But how can I implement action:@selector(gotoProd:) in tableviews ?? Any help will be greatly appreciated.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45  | Next Page >