Search Results

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

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

  • How can I get a nstableview to send an action when the user double-clicks an editable cell

    - by overcyn
    I am trying to emulate the behavior found in finder and itunes. Single click on a selected object edits it. Double click opens the object. I have set the doubleAction of the tableView but like it says in the documentation. "If the double-clicked cell is editable, this message isn’t sent and the cell is edited instead." I dont want this. Is there a way i can get that message sent even if the cell is editable? I really have no idea how to begin implementing this. Any general pointers would be appreciated.

    Read the article

  • Help me to complete my UITableView to Navigation Controller [iPhone SDK]

    - by Momeks
    I built an application. On the one my views I used TableView. So now I want to change this Table view to a navigation controller. 1- How can I change UITable view to Navigation Controller. I add navigation codes but I got some alert! [I know I must identify my navigation delegate, but HOW ?] Here is my Mapping Views! AppNameViewController FirstViewController [on this view I used table view and I want change to nav] SecondViewController ThirdViewControllerController

    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

  • Adding a UILabel to a UIToolbar

    - by Boolean
    I'm trying to add a label to my toolbar. Button works great, however when I add the label object, it crashes. Any ideas? UIBarButtonItem *setDateRangeButton = [[UIBarButtonItem alloc] initWithTitle:@"Set date range" style:UIBarButtonItemStyleBordered target:self action:@selector(setDateRangeClicked:)]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 20, 20)]; label.text = @"test"; [toolbar setItems:[NSArray arrayWithObjects:setDateRangeButton,label, nil]]; // Add the toolbar as a subview to the navigation controller. [self.navigationController.view addSubview:toolbar]; // Reload the table view [self.tableView reloadData];

    Read the article

  • Static keyboard in uitableview

    - by Martin
    I have a UITableView that holds just two cells with a textfield in each. As my tableview is just for editing the text in these textfields I always want the keyboard to be shown static in the bottom of the screen. So in viewDidLoad I set the first textfield to become first responder. Something I have noticed though is that when I push the UITableViewController into the UINavigationController the keyboard show up a little bit slower so you can see it animate into the screen. It would be much better if it was there already there when the uitableview shows up. I also tried making the textfield first responder before pushing it as recommended but that didn't made the keyboard show at all: MyTableViewController *myTableViewController = [[MyTableViewController alloc] initWithNibName:@"MyTableViewController" bundle:nil]; [myTableViewController.textField becomeFirstResponder]; [self.navigationController pushViewController:myTableViewController animated:YES]; [myTableViewController release]; How can I accomplish this? Thanks!

    Read the article

  • Changing UITableViewCell height on a grouped cell doesn't look good

    - by Sheehan Alam
    I have a UITableView with 3 sections. In the first section I have 2 grouped cells. I am modifying the first cell to be larger than the second. Though the first cell resizes, it seems to mess up the cell below it. How can I resolve this? - (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath { CGFloat rowHeight; if(indexPath.section == kBioSection) { switch(indexPath.row) { case kBioSectionDescriptionRow: rowHeight = 100; break; } } else { rowHeight = 50; } return rowHeight; }

    Read the article

  • Scroll the entire page with with UITableView that doesn't take up the entire screen

    - by KJF
    The only UITableViews I have worked with thus far are sized to fill the entire page. I'm trying to create a page in my app where I will have an image and a label on the top of the page followed by a UITableView to hold comments below it. Something like this springs to mind: http://www.inquisitr.com/wp-content/fbb.jpg My problem is if I add a UITableView below the image and label, when I scroll the tableview then only the UITableView cells scroll. Not the entire page. How would I go about making the entire page scroll so that the label and image scroll off the page and more table cells appear? Thanks.

    Read the article

  • UITextField in UITableViewCell Help

    - by W Dyson
    Hello All, I have scoured the internet looking for a good tutorial or posting about having a UITableView populated with a UITextField in each cell for data entry. I want to keep track of each UITextField and the text written within it while scrolling. The tableView will be sectioned. I have been using a custom UITableViewCell but I'm open to any method. Also, is it possible to use the textFields as ivars? If any of you could point me in the right direction, it would be greatly appreciated. Thank you in advance!

    Read the article

  • Arrays and application data

    - by s0mmer
    Hello everyone, At the moment i'm making an application where it is possible to make profiles with different settings. Which datatypes would you recommend me saving these information in? I have a table which is showing the profile name and the version number. But for each profile there need to be stored more information. Therefore the idea i'm working on have 2 arrays. 1 for all the profile information and 1 who is being made when loading the information. The second array is the one going to be showed in the table. Because the table doesnt show all the stored information. .. but this seems kinda stupid. Is there a more suitable method for saving the information in like 1 array, and just pass part of the data to the tableview?

    Read the article

  • numberOfSectionsInTable isn't called when [arr count] is returned

    - by user315471
    When I try returning the count of my newsItems array it breaks my application. I used NSLog to find out what the value of the newsItems count was when I returned 1. Here is from NSLog 2010-04-13 07:48:40.656 RSS Feed[453:207] Values of num items 31 2010-04-13 07:48:40.656 RSS Feed[453:207] Number of items 31 Does anyone know why returning [newsItems count] would cause my application to break? - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { NSLog(@"Values of num items %d",[newsItems count]); NSInteger *length = (NSInteger *)[newsItems count]; NSLog(@"Number of items %d",length); return 1; //return [newsItems count]; //This keeps breaking it for some reason }

    Read the article

  • UITableViewCell get nil

    - by MTA
    I create a UITableView with custom UITableViewCell,this is how i create the cell in cellForRowAtIndexPath: static NSString *CellIdentifier = @"SongsCell"; SongsCell *cell = (SongsCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil){ UIViewController *vc = [[[UIViewController alloc] initWithNibName:@"SongsCell" bundle:nil] autorelease]; cell = (SongsCell *) vc.view; } now i want to get all cells in the table info (parameter from cell) when a button pressed: for (int i = 0; i < [songTable numberOfRowsInSection:0]; i++) { NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0]; UITableViewCell *cell = [songTable cellForRowAtIndexPath:indexPath]; } Now i have a problem that this loop give me for cell a nil for all the cell that currently not seen in the table.

    Read the article

  • My table cells don't highlight immediately when touched

    - by Steve Denenberg
    Hi, In my app, I have a table view that has about eight cells. There is a navigation bar at the top. When a user touches a cell, nothing happens for about 1/2 second. Then the touched cell highlights blue and immediately the new view slides into position. The problem is that there is no feedback to the user about which cell he touched until just before the new view slides into position. For example, when I explore the tables in the iPhone's Settings application, when you touch a cell, the cell immediately turns blue, and then there is a 1/2 second delay, and then you see the new view. How do I get my table's feedback of highlighting the cells to happen immediately? I am using tableView didSelectRowAtIndexPath:, and each cell has an accessory button. Thanks for any insight.

    Read the article

  • how to get IndexPath

    - by user145883
    in iphone application. I'm trying to get indexPath.row value to do something on the basis of row selected in programmatically created tableview. Can someone please tell me why is the indexPath.row value is not coming correct. It's some thing like 21487...3? NSUInteger nSections = [myTableView numberOfSections]; NSUInteger nRows = [myTableView numberOfRowsInSection:nSections]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow: nRows inSection:nSections]; NSLog(@"No of sections in my table view %d",nSections); NSLog(@"No of rows in my table view %d",nRows); NSLog(@"Value of selected indexPath Row %d", indexPath.row); Thanks, Aaryan

    Read the article

  • How to set conditional activation to taskflows?

    - by shantala.sankeshwar(at)oracle.com
    This article describes implementing conditional activation to taskflows.Use Case Description Suppose we have a taskflow dropped as region on a page & this region is enclosed in a popup .By default when the page is loaded the respective region also gets loaded.Hence a region model needs to provide a viewId whenever one is requested.  A consequence of this is the TaskFlowRegionModel always has to initialize its task flow and execute the task flow's default activity in order to determine a viewId, even if the region is not visible on the page.This can lead to unnecessary performance overhead of executing task flow to generate viewIds for regions that are never visible. In order to increase the performance,we need to set the taskflow bindings activation property to 'conditional'.Below described is a simple usecase that shows how exactly we can set the conditional activations to taskflow bindings.Steps:1.Create an ADF Fusion web ApplicationView image 2.Create Business components for Emp tableView image3.Create a view criteria where deptno=:some_bind_variableView image4.Generate EmpViewImpl.java file & write the below code.Then expose this to client interface.    public void filterEmpRecords(Number deptNo){            // Code to filter the deptnos         ensureVariableManager().setVariableValue("some_bind_variable",  deptNo);        this.applyViewCriteria(this.getViewCriteria("EmpViewCriteria"));        this.executeQuery();       }5.Create an ADF Taskflow with page fragements & drop the above method on the taskflow6.Also drop the view activity(showEmp.jsff) .Define control flow case from the above method activity to the view activity.Set the method activity as default activityView image7.Create  main.jspx page & drop the above taskflow as region on this pageView image8.Surround the region with the dialog & surround the dialog with the popup(id is Popup1)9.Drop the commandButton on the above page & insert af:showPopupBehavior inside the commandButton:<af:commandButton text="show popup" id="cb1"><af:showPopupBehavior popupId="::Popup1"/></af:commandButton>10.Now if we execute this main page ,we will notice that the method action gets called even before the popup is launched.We can avoid this this by setting the activation property of the taskflow to conditional11.Goto the bindings of the above main page & select the taskflow binding ,set its activation property to 'conditional' & active property to Boolean value #{Somebean.popupVisible}.By default its value should be false.View image12.We need to set the above Boolean value to true only when the popup is launched.This can be achieved by inserting setPropertyListener inside the popup:<af:setPropertyListener from="true" to="#{Somebean.popupVisible}" type="popupFetch"/>13.Now if we run the page,we will notice that the method action is not called & only when we click on 'show popup' button the method action gets called.

    Read the article

  • Popping UIView crashes app

    - by Adun
    I'm basically pushing a UIView from a UITableViewController and all it contains is a UIWebView. However when I remove the UIView to return back to the UITableView the app crashes. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. if (indexPath.row == websiteCell) { NSString *urlPath = [NSString stringWithFormat:@"http://%@", exhibitor.website]; WebViewController *webViewController = [[WebViewController alloc] initWithURLString:urlPath]; // Pass the selected object to the new view controller. [self.parentViewController presentModalViewController:webViewController animated:YES]; [webViewController release]; } } If I comment out the [webViewController release] the app doesn't crash, but I know that this would be a leak. Below is the code for the Web Browser: #import "WebViewController.h" @implementation WebViewController @synthesize webBrowserView; @synthesize urlValue; @synthesize toolBar; @synthesize spinner; @synthesize loadUrl; -(id)initWithURLString:(NSString *)urlString { if (self = [super init]) { urlValue = urlString; } return self; } #pragma mark WebView Controls - (void)goBack { [webBrowserView goBack]; } - (void)goForward { [webBrowserView goForward]; } - (void)reload { [webBrowserView reload]; } - (void)closeBrowser { [self.parentViewController dismissModalViewControllerAnimated:YES]; } #pragma end // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; CGRect contentRect = self.view.bounds; //NSLog(@"%f", contentRect.size.height); float webViewHeight = contentRect.size.height - 44.0f; // navBar = 44 float toolBarHeight = contentRect.size.height - webViewHeight; // navigation bar UINavigationBar *navBar = [[[UINavigationBar alloc] initWithFrame:CGRectMake(0, 20, contentRect.size.width, 44)] autorelease]; navBar.delegate = self; UIBarButtonItem *doneButton = [[[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleDone target:nil action:@selector(closeBrowser)] autorelease]; UINavigationItem *item = [[[UINavigationItem alloc] initWithTitle:@"CEDIA10"] autorelease]; item.leftBarButtonItem = doneButton; [navBar pushNavigationItem:item animated:NO]; [self.view addSubview:navBar]; // web browser webBrowserView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 64, contentRect.size.width, webViewHeight)]; webBrowserView.delegate = self; webBrowserView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; webBrowserView.scalesPageToFit = YES; [self.view addSubview:webBrowserView]; // buttons UIBarButtonItem *backButton = [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"arrowleft.png"] style:UIBarButtonItemStylePlain target:self action:@selector(goBack)] autorelease]; UIBarButtonItem *fwdButton = [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"arrowright.png"] style:UIBarButtonItemStylePlain target:self action:@selector(goForward)] autorelease]; UIBarButtonItem *refreshButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(reload)] autorelease]; UIBarButtonItem *flexSpace = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease]; UIBarButtonItem *fixSpace = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil] autorelease]; [fixSpace setWidth: 40.0f]; spinner = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite] autorelease]; [spinner startAnimating]; UIBarButtonItem *loadingIcon = [[[UIBarButtonItem alloc] initWithCustomView:spinner] autorelease]; NSArray *toolBarButtons = [[NSArray alloc] initWithObjects: fixSpace, backButton, fixSpace, fwdButton, flexSpace, loadingIcon, flexSpace, refreshButton, nil]; // toolbar toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, webViewHeight, contentRect.size.width, toolBarHeight)]; toolBar.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth; toolBar.items = toolBarButtons; [self.view addSubview:toolBar]; // load the request NSURL *requestString = [NSURL URLWithString:urlValue]; [webBrowserView loadRequest:[NSURLRequest requestWithURL: requestString]]; [toolBarButtons release]; } - (void)viewWillDisappear { if ([webBrowserView isLoading]) { [webBrowserView stopLoading]; webBrowserView.delegate = nil; } } #pragma mark UIWebView - (void)webViewDidStartLoad:(UIWebView*)webView { [spinner startAnimating]; } - (void)webViewDidFinishLoad:(UIWebView*)webView { [spinner stopAnimating]; } - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { loadUrl = [[request URL] retain]; if ([[loadUrl scheme] isEqualToString: @"mailto"]) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"CEDIA10" message:@"Do you want to open Mail and exit AREC10?" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes",nil]; [alert show]; [alert release]; return NO; } [loadUrl release]; return YES; } - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { [spinner stopAnimating]; if (error.code == -1009) { // no internet connection UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"CEDIA10" message:@"You need an active Internet connection." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; } } #pragma mark UIAlertView - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 1) { [[UIApplication sharedApplication] openURL:loadUrl]; [loadUrl release]; } } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. [webBrowserView release]; [urlValue release]; [toolBar release]; [spinner release]; [loadUrl release]; webBrowserView = nil; webBrowserView.delegate = nil; urlValue = nil; toolBar = nil; spinner = nil; loadUrl = nil; } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [webBrowserView release]; [urlValue release]; [toolBar release]; [spinner release]; [loadUrl release]; webBrowserView.delegate = nil; urlValue = nil; toolBar = nil; spinner = nil; loadUrl = nil; [super dealloc]; } @end Below this is the crash log that I am getting: Date/Time: 2010-05-13 11:58:20.023 +1000 OS Version: iPhone OS 3.1.3 (7E18) Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x00000000, 0x00000000 Crashed Thread: 0 Thread 0 Crashed: 0 libSystem.B.dylib 0x00090b2c __kill + 8 1 libSystem.B.dylib 0x00090b1a kill + 4 2 libSystem.B.dylib 0x00090b0e raise + 10 3 libSystem.B.dylib 0x000a7e34 abort + 36 4 libstdc++.6.dylib 0x00066390 __gnu_cxx::__verbose_terminate_handler() + 588 5 libobjc.A.dylib 0x00008898 _objc_terminate + 160 6 libstdc++.6.dylib 0x00063a84 __cxxabiv1::__terminate(void (*)()) + 76 7 libstdc++.6.dylib 0x00063afc std::terminate() + 16 8 libstdc++.6.dylib 0x00063c24 __cxa_throw + 100 9 libobjc.A.dylib 0x00006e54 objc_exception_throw + 104 10 CoreFoundation 0x00095bf6 -[NSObject doesNotRecognizeSelector:] + 106 11 CoreFoundation 0x0001ab12 ___forwarding___ + 474 12 CoreFoundation 0x00011838 _CF_forwarding_prep_0 + 40 13 QuartzCore 0x0000f448 CALayerCopyRenderLayer + 24 14 QuartzCore 0x0000f048 CA::Context::commit_layer(_CALayer*, unsigned int, unsigned int, void*) + 100 15 QuartzCore 0x0000ef34 CALayerCommitIfNeeded + 336 16 QuartzCore 0x0000eedc CALayerCommitIfNeeded + 248 17 QuartzCore 0x00011ee8 CA::Context::commit_root(void*, void*) + 52 18 QuartzCore 0x00011e80 x_hash_table_foreach + 64 19 QuartzCore 0x00011e2c CA::Transaction::foreach_root(void (*)(void*, void*), void*) + 40 20 QuartzCore 0x0000bb68 CA::Context::commit_transaction(CA::Transaction*) + 1068 21 QuartzCore 0x0000b46c CA::Transaction::commit() + 276 22 QuartzCore 0x000135d4 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 84 23 CoreFoundation 0x0000f82a __CFRunLoopDoObservers + 466 24 CoreFoundation 0x00057340 CFRunLoopRunSpecific + 1812 25 CoreFoundation 0x00056c18 CFRunLoopRunInMode + 44 26 GraphicsServices 0x000041c0 GSEventRunModal + 188 27 UIKit 0x00003c28 -[UIApplication _run] + 552 28 UIKit 0x00002228 UIApplicationMain + 960 29 CEDIA10 0x00002e16 main (main.m:14) 30 CEDIA10 0x00002db8 start + 32 Any ideas on why the app is crashing?

    Read the article

  • Manual (Dynamic) LINQ subquery using IN clause

    - by immortalali-msn-com
    Hi Everyone, I want to query the DB through LINQ writing manual SQL, my linq method is: var q = db.TableView.Where(sqlAfterWhere); returnValue = q.Count(); this method queries well if the value passed to variable "sqlAfterWhere" is: (this variable is String type) it.Name = 'xyz' but what if i want to use IN clause, using a sub query. (i need to use 'it' before every column name in the above query to work), i cant use 'it' before the sub query columns as its a separate query, so what should i do, if i dont use any thing, and use column names directly it gives error saying " could not be resolved" where is my column names with out 'it' at the begining. So the query not working is: (this is a string passed to the variable above): it.Name IN (SELECT Name FROM TableName WHERE Address LIKE '%SomeAddress%') the errors come out as: Name could not be resolved Address could not be resolved The exact error is: "'Name' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly., near simple identifier, line 6, column 25." Same error for "Address as well if i use 'it.' before these columns it gives error as: "The element type 'Edm.Int32' and the CollectionType 'Transient.collection[Transient.rowtype(GroupID,Edm.Int32(Nullable=True,DefaultValue=))]' are not compatible. The IN expression only supports entity, primitive, and reference types. , near WHERE predicate, line 6, column 14." Thanks for the help

    Read the article

  • Rendering a UIWebView in drawRect with loadHTMLString

    - by Nick Weaver
    Hello there, I am having a problem with UIWebView. I'd like to render my own html code in it. When I add a webview as a subview and put in some html code it renders just fine. When it gets down to some optimized drawing of tableview cell with the drawRect method the problem pops up. Drawing UIView descendants works pretty well this way. It's even possible to load a URL with the loadRequest method, setting the delegate, conforming to the UIWebViewDelegate protocol and redrawing the table cell with setNeedsDisplay when webViewDidFinishLoad is called. It does show, but when it comes to loadHTMLString, nothing shows up, only a white rect. Due to performance reasons I have to do the drawing in the drawRect method. Any ideas? Thanks in advance Nick Example snippet code for the html code being loaded by a UIWebView: NSString *html = @"<html><head><title>My fancy webview</title></head><body style='background-color:green;'><p>It somehow seems<h2 style='color:black;'>this does not show up in drawRect</h2>!</p></body></html>"; [webView loadHTMLString:html baseURL:nil]; Snippet for the drawRect method: - (void)drawRect:(CGRect)aRect { CGContextRef context = UIGraphicsGetCurrentContext(); [[webView layer] renderInContext:context]; }

    Read the article

  • UITableView UITableViewCell not reloading on reloadData

    - by David van Dugteren
    This question has been asked a few times now, but there exists no answer on the web that has solved the problem for me yet... See the code: { const NSInteger TOP_LABEL_TAG = 1001; static NSString *CellIdentifier = @"CellIdentifier"; UITableViewCell *cell = [theTableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } getAQuestionToAnswer = [[QuestionsToAnswer sharedInstance] getLatestLoadedQuestion]; UILabel *topLabel; topLabel = [[[UILabel alloc] initWithFrame: CGRectMake ( 50, 18, 260, 75)] autorelease]; [cell.contentView addSubview:topLabel]; topLabel.tag = TOP_LABEL_TAG; topLabel.backgroundColor = [UIColor clearColor]; topLabel.textColor = [UIColor colorWithRed:0.25 green:0.0 blue:0.0 alpha:1.0]; topLabel.highlightedTextColor = [UIColor colorWithRed:1.0 green:1.0 blue:0.9 alpha:1.0]; [topLabel setFont:[UIFont fontWithName:@"MarkerFelt-Thin" size:13]]; topLabel.numberOfLines = 4; topLabel = (UILabel *)[cell viewWithTag:TOP_LABEL_TAG]; topLabel.text = [NSString stringWithFormat:@"%@", [getAQuestionToAnswer valueForKey:@"question"] ]; Some code is omitted but the basics is there, I'm updating by means of a shake gesture, the NSLog confirms that the getAQuestionToAnswer is indeed updated with a new question after the gesture. Yet at run time, no matter what I do... e.g. [self.tableview reloaddata]; nothing works. It just doesn't want to refresh.

    Read the article

  • How to delete row in TTTableViewController (Three20)

    - by Dmitry
    Hi, The Three20 is great library. It's making the work with tables very easy. But one gap that I noticed - is deletion of rows, with animation. I spent many hours trying to do this, and this is what I'm doing: // get current index patch UITableView* table = [super tableView]; NSIndexPath *indexPath = [table indexPathForSelectedRow]; //delete row in data source TTListDataSource * source = (TTListDataSource *)self.dataSource; [source.items removeObjectAtIndex:indexPath.row]; // delete row from the table, with animation [table deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; After this code runs the error appears: [NSCFArray objectAtIndex:]: index (0) beyond bounds (0) I'm using the class inherited from the TTTableViewController. And I doesn't implement the DataSourceDelegate or TableViewDelegate because I'm using the Three20 as much as possible. So, this is how I create datasource: for(NSDictionary *album in (NSArray *)albums){ TTTableRightImageItem *item = [TTTableRightImageItem itemWithText:@"name" imageURL:@"image url" defaultImage:nil imageStyle:TTSTYLE(rounded) URL:@"url of selector where I actually catch the tap on a row"]; [tableItems addObject:item]; } self.dataSource = [TTListDataSource dataSourceWithItems:tableItems]; I read this article (article) but it doesn't help :( So, I know that this is very simple for gurus from this site. Can you just give me advanced sample of how to do this Thanks

    Read the article

  • UISearchBar and UINavigationItem

    - by tbehunin
    I can't seem to get a UISearchBar to position itself from the far left to the far right in the navigation bar. In the -(void)viewDidLoad method, I have the following code: `UISearchBar *sb = [[UISearchBar alloc] initWithFrame:self.tableView.tableHeaderView.frame]; sb.delegate = self; self.navigationItem.titleView = sb; [sb sizeToFit]; [sb release];` When you build and run, it looks just fine at first glance. However, looking more closely, you can tell there is a margin/space on the left. This wouldn't be a big deal in the grand scheme of things, but when I tap the search bar to start a search, I animate the cancel button into view. Because the search bar is positioned slightly to the right, the animation is jerky and the cancel button falls off the end like so: link text It seems as if the UINavigationItem is like a table with three cells, where there is a padding on the first and last which I can't remove - nor does there seem to be a way to 'merge' it all together and then place the search bar there. I know this look is possible, because the AppStore search has a search bar in the navigation bar and it goes all the way to the edges. Anyone know how to get the search bar to go all the way to the edges so my slide-in cancel button animation will work properly?

    Read the article

  • How to change the border color of a Grouped UITableView

    - by ctpenrose
    This concerns iPhoneOS-sdk-3.2 I am having difficulty changing the border color of a grouped UITableView. I can change the cell background color, separator color, text color, quite easily now, and the rounded corners clip correctly, even when highlighted with whatever colors I have chosen. However the surrounding border remains infuriatingly gray despite many different attempts. I have read all of the related posts I can find via Google, let alone stackoverflow. I have tried both a programmatic and xib-based solution and both provide the same results. I will share the programmatic version below: I have a UIViewController subclass rather than a UITableViewController subclass to act as a UITableView delegate -- I chose this route as I am coding on the iPad and UITableViewController reportedly takes over the whole screen. loadView method of my UIViewController subclass: - (void) loadView { self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; [self.view release]; self.view.backgroundColor = [UIColor blackColor]; // add and configure UITableView CGRect tableViewRect = CGRectMake(0., 0., 256., 768.); myTableView = [[UITableView alloc] initWithFrame:tableViewRect style:UITableViewStyleGrouped]; // set the tableview delegate to this object and the datasource to the datasource which has already been set myTableView.delegate = self; myTableView.dataSource = self; myTableView.sectionIndexMinimumDisplayRowCount=1; myTableView.backgroundColor = [UIColor clearColor]; myTableView.separatorColor = [UIColor whiteColor]; myTableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; myTableView.opaque = NO; // add the table view to our background view [self.view addSubview:myTableView]; [myTableView release]; }

    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

  • UIButton in UITableViewCell events not working

    - by Tristan
    I see this problem all over the net, and none of the solutions listed work for me! I have added UIButton to a UITableViewCell in IB. I have assigned a custom UITableViewCell class to the UITableViewCell. My custom UITableViewCell class has an IBAction that im connecting to the Touch Up Inside event (I have tried other events they all don't work) but the IBAction function is never called! There is nothing else in the UITableViewCell, I have added the UIButton directly into the Content View. And everything has user interaction enabled! It is as simple as that I have nothing complex going on! What is is about a UITableViewCell that stops buttons working? EDIT: By request the code where I initialize my UITableViewCells the custom class is called DownloadCell - (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"DownloadCell"; DownloadCell *cell = (DownloadCell *)[aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { UIViewController * cellController = [[UIViewController alloc] initWithNibName:@"DownloadCell" bundle:nil]; cell = (DownloadCell *)cellController.view; [cellController release]; } SoundLibrarianIPhoneAppDelegate * del = (SoundLibrarianIPhoneAppDelegate *)[UIApplication sharedApplication].delegate; DownloadQueue * dq = del.downloadQueue; DownloadJob * job = [dq getDownloadJob: indexPath.row]; [job setDelegate:self]; SoundInfo * info = [job sound]; NSArray * seperated = [info.fileName componentsSeparatedByString: @"."]; NSString * displayName = [seperated objectAtIndex:0]; displayName = [displayName stringByReplacingOccurrencesOfString:@"_" withString:@" "]; displayName = [displayName capitalizedString]; [cell.titleLabel setText: displayName]; cell.progressBar.progress = job.percentCompleted; [cell.progressLabel setText: [job getProgessText]]; cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.userInteractionEnabled = YES; [cell setDelegate:self]; return cell; }

    Read the article

  • UINavigationController inside tabbar loading a child root view

    - by Doug
    Hi guys, Firstly i'll preface by saying that i am a complete Cocoa touch/objective c noob (.Net dev having a dabble) I have searched on Google as well as here but cannot seem to find an easy solution. I have a UItabbarcontroller view with a UINavigationController inside its first tab I have the root view for this UINavigationController stored in a seperate class and NIB as i am trying to seperate the data viewing from the data loading (i'm going to reuse the table list in multiple places in my database) and simply pass the root view its data using a loading method and have it take it from there. What i want to happen: App loads and loads the first view of the tab bar (A UINavigationController) The UINavigationController inside the first view loads a root view (a UIViewController with a table view) and sets its title The UINavigationController loads the data from a web service and parses it The UINavigationController sends the data to a loading method inside the UIViewController Am i thinking about this completely wrongly? What currently happens: the first tab bar loads with an empty uinavigationcontroller (no table view) the data methods fire and get the webservice data this child view gets sent its data using the loading method the tableview delegate events fail to fire inside the child view telling it to load the data into the table I just can't seem how to load my second view inside the root view of the navigation controller and then send it my data?

    Read the article

  • UIPageControl in a ITableViewCell gets shoved to the top left corner

    - by Danny Tuppeny
    I'm trying to put a UIPageControl inside a cell (there's nothing else in the cell), but I have two problems: The dots are aligned at the top-left of the cell, so you only see the bottom-right quarter of the first dot, and the bottom half of the other dots (like the first dots center is 0, 0). Unless you tab the cell to select it (goes blue), you can't see the dots at all. Other controls I've put into a cell have filled the whole area as wanted. How do I tell the UIPageControl to fill the whole cell (and align in the middle) How do I change the colours so the dots can be seen? I tried calling [pageControl setBackgroundColor] but it didn't seem to do anything. Here's the code I'm using: // Create a page control UIPageControl *pageControl = [[[UIPageControl alloc] init] autorelease]; // Set the number of pages to match the images [pageControl setNumberOfPages:[imageFilenames count]]; [pageControl setCurrentPage:1]; // Create the cell and add the paging control UITableViewCell *cell = [self getCell:tableView withIdentifier:@"ImagePager"]; [cell addSubview:pageControl]; //[[cell textLabel] setText:@"ADD PAGING CONTROL"]; return cell;

    Read the article

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