Search Results

Search found 295 results on 12 pages for 'uitableviewcontroller'.

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

  • Terminating app due to uncaught exception 'NSInvalidArgumentException' in iPhnoe

    - by mayur birari
    i have view controller including image ,table and tab ,i want to fill the table thats why i written separate class for table as uitableviewcontroller and give mapping to that class in IB, but i have following exception Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[AssetTableView superview]: unrecognized selector sent to instance 0x39322b0' please give me answer ,i am waiting, thANKS IN ADVANCE

    Read the article

  • Flash of a Bullet in the top left corner of the search results

    - by joneswah
    I am using a UISearchDisplayController and SearchBar initialised from a nib. when the search is being run I get a flash of a small circle what looks like a "bullet" in the top left corner of the search results. [See attached screenshot] It occurs in the simulator and on the device sporadically I have looked through my nib and I am not adding any stray views and was wondering if anyone else had this issue or knows how to get rid of it? thanks @interface SearchTabViewController : UITableViewController

    Read the article

  • Get UITableView to scroll to the selected UITextField and Avoid Being Hidden by Keyboard

    - by Lauren Quantrell
    I have a UITextField in a table view on a UIViewController (not a UITableViewController). If the table view is on a UITableViewController, the table will automatically scroll to the textField being edited to prevent it from being hidden by the keyboard. But on a UIViewController it does not. I have tried for a couple of days reading through multiple ways to try to accomplish this and I cannot get it to work. The closest thing that actually scrolls is: -(void) textFieldDidBeginEditing:(UITextField *)textField { // SUPPOSEDLY Scroll to the current text field CGRect textFieldRect = [textField frame]; [self.wordsTableView scrollRectToVisible:textFieldRect animated:YES]; } However this only scrolls the table to the topmost row. What seems like an easy task has been a couple of days of frustration. I am using the following to construct the tableView cells: - (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *identifier = [NSString stringWithFormat: @"%d:%d", [indexPath indexAtPosition: 0], [indexPath indexAtPosition:1]]; UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:identifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier] autorelease]; cell.accessoryType = UITableViewCellAccessoryNone; UITextField *theTextField = [[UITextField alloc] initWithFrame:CGRectMake(180, 10, 130, 25)]; theTextField.adjustsFontSizeToFitWidth = YES; theTextField.textColor = [UIColor redColor]; theTextField.text = [textFieldArray objectAtIndex:indexPath.row]; theTextField.keyboardType = UIKeyboardTypeDefault; theTextField.returnKeyType = UIReturnKeyDone; theTextField.font = [UIFont boldSystemFontOfSize:14]; theTextField.backgroundColor = [UIColor whiteColor]; theTextField.autocorrectionType = UITextAutocorrectionTypeNo; theTextField.autocapitalizationType = UITextAutocapitalizationTypeNone; theTextField.clearsOnBeginEditing = NO; theTextField.textAlignment = UITextAlignmentLeft; //theTextField.tag = 0; theTextField.tag=indexPath.row; theTextField.delegate = self; theTextField.clearButtonMode = UITextFieldViewModeWhileEditing; [theTextField setEnabled: YES]; [cell addSubview:theTextField]; [theTextField release]; } return cell; } I suspect I can get the tableView to scroll properly if I can somehow pass the indexPath.row in the textFieldDidBeginEditing method? Any help is appreciated.

    Read the article

  • How to call a view on click of each UITableViewCell programatically?

    - by Cathy
    Hi, I have created a UITableViewcontroller and a UINavigationController in a TableController.m with UITableviewCell set to say @"CellOne" @"CellTwo". Now i also created two other files `ImageView1.m` ImageView2.m where if i click on CellOne i should be able to get the view placed on ImageView1.m, same applied to the ImageView2.m.How should i achieve this programatically without using nib file?

    Read the article

  • iPad application UITableView delegate methods are not getting called

    - by jAmi
    Hi, I am using the same technique as i populate my UITableView in iphone while writing my iPad application. Tab Bar Controller UINavigationControllerUITableViewController of type myCustomTable(load From NIB) MyCustomTableViewController NIB and class file implements the delegate methods @interface MyCustomTableViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> { NSMutableArray *PDFList; IBOutlet UITableView *PDFTable; } but my delegate methods are not getting called. What do i do?

    Read the article

  • Please recommend a patterns book for iOS development

    - by Brett Ryan
    I've read several books on iOS development and Objective-C, however what a lot of them teach is how to work with interfaces and all contain the model inside the view controller, i.e. a UITableViewController based view will simply have an NSArray as it's model. I'm interested in what the best practices are for designing the structure of an application. Specifically I'm interested in best practices for the following: How to separate a model from the view controller. I think I know how to do this by simply replacing the NSArray style example with a specific model object, however what I do not know how to do is alert the view when the model changes. For example in .NET I would solve this by conforming to INotifyPropertyChanged and databinding, and similarly with Java I would use PropertyChangeListener. How to create a service model for my domain objects. For example I want to learn the best way to create a service for a hypothetical Widget object to manage an internal DB and also services for communicating with remote endpoints. I need to learn the best ways to do this in a way that interface components can subscribe to events such as widgetUpdated. These services should be singleton classes and some how dependency injected into model/controller objects. Books I've read so far are: Programming in Objective-C (4th Edition) Beginning iOS 5 Development: Exploring the iOS SDK The iOS 5 Developer's Cookbook: Expanded Electronic Edition: Essentials and Advanced Recipes for iOS Programmers Learn Objective-C on the Mac: For OS X and iOS I've also purchased the following updated books but not yet read them. The Core iOS 6 Developer's Cookbook (4th edition Programming in Objective-C (5th Edition) I come from a Java and C# background with 15 years experience, I understand that many of the ways I would do things in these languages may not fit to the ObjC way of developing applications. Any guidance on the topic is very much appreciated.

    Read the article

  • What patterns book for iOS development contains this specific information? [closed]

    - by Brett Ryan
    I've read several books on iOS development and Objective-C, however what a lot of them teach is how to work with interfaces and all contain the model inside the view controller, i.e. a UITableViewController based view will simply have an NSArray as it's model. I'm interested in what the best practices are for designing the structure of an application. Specifically I'm interested in best practices for the following: How to separate a model from the view controller. I think I know how to do this by simply replacing the NSArray style example with a specific model object, however what I do not know how to do is alert the view when the model changes. For example in .NET I would solve this by conforming to INotifyPropertyChanged and databinding, and similarly with Java I would use PropertyChangeListener. How to create a service model for my domain objects. For example I want to learn the best way to create a service for a hypothetical Widget object to manage an internal DB and also services for communicating with remote endpoints. I need to learn the best ways to do this in a way that interface components can subscribe to events such as widgetUpdated. These services should be singleton classes and some how dependency injected into model/controller objects. Books I've read so far are: Programming in Objective-C (4th Edition) Beginning iOS 5 Development: Exploring the iOS SDK The iOS 5 Developer's Cookbook: Expanded Electronic Edition: Essentials and Advanced Recipes for iOS Programmers Learn Objective-C on the Mac: For OS X and iOS I've also purchased the following updated books but not yet read them. The Core iOS 6 Developer's Cookbook (4th edition Programming in Objective-C (5th Edition) I come from a Java and C# background with 15 years experience, I understand that many of the ways I would do things in these languages may not fit to the ObjC way of developing applications. Would someone be able to provide me with the book on this topic containing this specific subject matter?

    Read the article

  • Tableview reload data problem iphone sdk

    - by neha
    Hi all, I have a class A which is a subclass of uitableviewcontroller and one more class B which actually displays my tableview with its content is a subclass of A. There's an xml parser which parses my xml and stores the content in an nsmutablearray of application delegate. Now, I fetch this delegate array into a local nsmutablearray in class B to minimise the communication between the two classes i.e. delegate and class B and display that. After certain condition is met in class A, I'm calling xml parser to refill the delegate array and I'm calling class B's tableview reload method. The problem is when I call the tableview's reload data, class B's delegate methods are called. But before that I need to grab this delegate array in local array in class B. How shall I do that? Can anybody please help? Thanx in advance.

    Read the article

  • dismissModalViewControllerAnimated makes my app crash :(

    - by Koning Baard XIV
    I'm creating an iPad app, and I have two classes: NWRootViewController : UITableViewController and UINewFeedViewController : UIViewController. In NWRootViewController I have an UIBarButtonItem, which, when tapped, pops up a modal view controller called NWNewFeedViewController: // THIS CODE IS IN NWROOTVIEWCONTROLLER.M // New Feed -(IBAction)showNewFeedViewAction:(id)sender { [newFeedViewController setModalPresentationStyle:UIModalPresentationFormSheet]; [self presentModalViewController:newFeedViewController animated:YES]; } This works fine. However, in the NWNewFeedViewController's view, I have another UIBarButtonItem which does this when tapped: // THIS CODE IS IN NWNEWFEEDCONTROLLER.M // Buttons -(IBAction)cancelAction:(id)sender { [self dismissModalViewControllerAnimated:YES]; } When I tap this button, the app crashes with: 2010-04-10 12:39:46.703 News[580:207] *** -[NWDetailViewController cancelAction:]: unrecognized selector sent to instance 0x4741110 2010-04-10 12:39:46.705 News[580:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NWDetailViewController cancelAction:]: unrecognized selector sent to instance 0x4741110' 2010-04-10 12:39:46.705 News[580:207] Stack: ( 40878667, 2458187017, 41150267, 40613142, 40609810, 2776006, 4876265, 2776006, 3246293, 3255055, 3250242, 2899304, 2793965, 2825287, 49238396, 40419388, 40415304, 49232029, 49232226, 2817505 ) Can anyone help me? Thanks

    Read the article

  • UITableView in a View controller by a UIViewController and not a UITableView

    - by dirrigc
    Hi all, I have a View with lots of things inside it including buttons, a scroll view and a tableView (ipad app). I am controller this view with a viewController subclass but I don't know how to manage my tableView. I don't know where put the methods : - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath should i add them to my ViewController or should i create a new subclass of UITableViewController (and get them "for free") and set the dataSource and delegate of my tableView to that class when I create it programmatically? I am storing the data I want to show in my appDelegate following the tutorial : http://www.iphonesdkarticles.com/2008/10/sqlite-tutorial-selecting-data.html I am new at developing and I fear I am spagetti coding. Thanks a lot

    Read the article

  • No scrolling occurs when UITableView scrollToRowAtIndexPath is invoked

    - by theactiveactor
    My view contains a simple TableView with 6 rows and a button that invokes doScroll when clicked. My objective for doScroll() is simply scroll to the 5th cell such that it's at top of the table view. - (void)doScroll: (id)sender { NSIndexPath *index = [NSIndexPath indexPathForRow:4 inSection: 1]; [m_tableView scrollToRowAtIndexPath:index atScrollPosition:UITableViewScrollPositionTop animated:YES]; } However when doScroll is invoked, the tableview scrolls only slightly. I suspect this has something to do with the size of the scroll view. So I tried increasing the height of m_tableview.contentsize before scrolling. After I do this however, no scrolling occurs at all... The view controller is a simple UIViewController and refers to the table view via IBOutlet. For some reason, scrolling works as expected for the default Navigation Based Application, where the controller is a UITableViewController

    Read the article

  • iPhone:Tabbar item actions are not happening

    - by user187532
    Hello all, I created a window application, which has a tabbar controller with four tabbar items. Each tabbar items are linked with a tableview. I have also set Navigation bar for each tabbar items. I have appdelegate file, which calls the first tableview controller of which is set for first tabbar item. I am trying to retrieve and do an action whenever a tabbar item is clicked. For that, i tried to add "- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item" and "- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UITableViewController *)viewController" in my first tableview controller, but it is not at all responding whenever i click any tabbar items. My question is, if i create a window based application and added tabbar controller, tableview and navigation bar in .XIB file, is it not possible to access and do an action programatically whenever a tabbar item is clicked? (or) Am i doing anything wrong? Please help me to resolve this and share your ideas. Thanks.

    Read the article

  • iPhone SDK: Transparent tableviewcell isn't transparent?

    - by Harkonian
    I have a UITableViewController that has a background image. I am setting the image for the tableview like this: [self.view setBackgroundColor: [UIColor colorWithPatternImage: [UIImage imageWithContentsOfFile: [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: @"background1.jpg"]]]]; The problem is, each of my custom tableview cells get the same background image--it's repeated in each cell. As a test, I tried making everything in my cell transparent with an alpha of 0.0, but even then although I can't see any of the labels in each cell, I still see the background image repeated in each cell: cell.backgroundColor = [UIColor clearColor]; cell.contentView.backgroundColor = [UIColor clearColor]; cell.contentView.alpha = 0.0; cell.alpha = 0.0; Any suggestions on how to get my table's background image to stop repeating in each cell would be appreciated!

    Read the article

  • TableView as DetailView's subview with a UISplitViewController?

    - by Gerry
    I have a UISplitViewController, I used the iPad template to start. To change the type of view in the detailview area, I'm adding my view types as subviews to the DetailViewController's view. This works for UIViewController derived views, but not for UITableViewController view types?. Why would this be? My problem is rooted in the fact that the manufactured DetailView is the UISplitViewController's delegate. To get the correct popover behaviour, I'd like to keep it add buttons to its toolbar and then based on user selection open different details when master list selections are made. Thanks,

    Read the article

  • UITableView background customization strange behavior

    - by Omer
    Hi, There is a couple of hours that I'm trying to set a tableView background image. My controller is a subclass of UITableViewController, and I simply wrote this lines of code in ViewDidLoad method. UIImage *image = [UIImage imageNamed:@"home-portrait-iphone.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; self.tableView.backgroundView = imageView; Everything looks great on the simulator, I mean, I see my table and as background view, y can see the image. But when the app is running on the device (ipod touch), I get this error: Program received signal: “SIGABRT”. and the stack says: * -[UITableView setBackgroundView:]: unrecognized selector sent to instance 0x812e00 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '** -[UITableView setBackgroundView:]: unrecognized selector sent to instance 0x812e00' and the exception is thrown in the assignment, a mean this line: self.tableView.backgroundView = imageView; any ideas? Thank you in advance.

    Read the article

  • iPhone - Setting background on UITableView

    - by Hans Espen
    Is there any way to set a background view on a UITableViewController? I try with the code I am using on a UIViewController, but the view comes over all the contents of the table view, and if I add the background view in the cellForRowAtIndexPath-method, it is not showing at all. Anyone done this before or have an idea on how it can be done? Here is the code I am using: UIImage *image = [UIImage imageNamed: @"background.jpg"]; UIImageView *backImage = [[UIImageView alloc] initWithImage: image]; [self.view addSubview: backImage]; [self.view sendSubviewToBack: backImage]; Thanks

    Read the article

  • How do I reduce the height of a TableView when it is constructed in IB?

    - by erotsppa
    I wanted to add a view to the bottom of my screen. The controller is a UITableViewController, how do I shrink the tableView and add a extra view at the bottom of the tableview? I've tried setting the frame of self.tableView in different places (viewDidLoad, viewWillAppear etc) but nothing happens. The tableView is created by IB and not programtically. I've tried added a footer to my table view but that's not what I want, because the footer actually scrolls up, I want a static non moving View at the bottom of the screen.

    Read the article

  • Scroll bar does not appear in UITableView

    - by user335398
    Hi there, When I create UITableView with UITableViewController, all the right - scroll bar is present on UITableView. But I'd like to place some more controls apart from table on the area, so I have to use UIViewController instead. I create UITableView *tableView as controller's member, and set controller as its delegate conforming to UITableViewDelegate and UITableViewDataSource protocols. All the OK now, except of scroll bars do not appear at all. tableView.showsVerticalScrollIndicator is set to YES. Where might be a problem? Much thanks! WBR, Timur

    Read the article

  • save selected row in UITableView after reloadData

    - by vinnitu
    I write custom jabber client in iphone. I use xmppframework as engine. And I have UITableViewController with NSMutableArray for repesent contact list. When i receive(or somebody change it contents) roster (aka contact list) i wanna change UITableView items (add/remove/modify). So if User work with listView at time when list updates by [items addObject:newItem]; [self.tableView reloadData]; user lost current selection item. So, my question is howto save (if possible, i mean if given selected item not removed) current select item after reloadData? Thx.

    Read the article

  • Why does my UITableView change from UITableViewStyleGrouped to UITableViewStylePlain

    - by casper
    My application has a view controller that extends UITableViewController. The initialization method looks like this: - (id)initWithCoder:(NSCoder*)coder { if (self = [super initWithCoder:coder]) { self.tableView = [[UITableView alloc] initWithFrame:self.tableView.frame style:UITableViewStyleGrouped]; } return self; } When the view is initially loaded, it's displayed as UITableViewStyleGrouped. However, if my app ever receives a low memory warning, the above view changes to UITableViewStylePlain. There is no associated xib file with the View/Controller. The viewDidUnload and didReceiveMemoryWarning methods are straightforward: - (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. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } My question is, why does the table style change when I receive a memory warning?

    Read the article

  • Pass NSMutableArray between two UIViewController's

    - by aahrens
    I have two view controllers name RootViewController and SecondViewController. In the FirstViewController I have this NSMutableArray @interface RootViewController : UITableViewController { NSMutableArray *allClasses;}@property (nonatomic,retain) NSMutableArray *allClasses; In the RootViewController I populate the UITableView with all the objects within allClasses In my SecondViewController I have @interface SecondViewController : UIViewController <UITextFieldDelegate,UIPickerViewDelegate> { NSMutableArray *arrayStrings;} I have a method that adds new NSStrings to the arrayStrings. My goal is to be able to pass the arrayStrings to the RootViewController by trying something similar to allClasses = arrayStrings. That way when the RootViewController is loaded it can populate with new information. How would I got about accomplishing that task?

    Read the article

  • iPhone: Sharing protocol/delegate code

    - by pion
    I have the following code protocol snippets: @protocol FooDelegate; @interface Foo : UIViewController { id delegate; } ... @protocol FooDelegate ... // method 1 ... // method 2 ... @end Also, the following code which implements FooDelegate: @interface Bar1 : UIViewController { ... } @interface Bar2 : UITableViewController { ... } It turns out the implementation of FooDelegate is the same on both Bar1 and Bar2 classes. I currently just copy FooDelegate implementation code from Bar1 to Bar2. How do I structure/implement in such a way that Bar1 and Bar2 share the same code in a single code base (not as currently with 2 copies) since they are the same? Thanks in advance for your help.

    Read the article

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