Search Results

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

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

  • Opening Another Xib form an Xib

    - by Goods
    Not a Noob as yesterday, but still green. I have been playing around with the code that Elisabeth Robson has put together HERE. I have a UITabbarcontoller and a IUNavigationController they seem to work fine. I have a UITableviewController to which I loads my NSMutable array. The user clicks a cell and didSelectRowAtIndexPath xib is loaded onto the stack. I put a 'Learn More' button on the current xib(BookDetailView). I've tried a few approaches to load a newer xib when the 'Learn More' button is pressed but have failed. Ive Tried IBAction and Pushing the Newer xib to the top. Do I need to create another view controller? Thanks for looking.

    Read the article

  • How does autosize work in iPhone SDK?

    - by bresc
    Hi, I'm trying to do the following: I need to do a lot of custom things, so I subclassed everything. I'm having issues with autoresize and positioning. For instance the UIToolBar is not at the correct position. So here is the question: If you don't use UITableViewController or any other Controller, that takes care of all the positioning and sizing, then you have to do it yourself. Can someone someone tell me how this works? What do I need to understand?

    Read the article

  • Objective-C : Member variable is losing reference between method calls.

    - by Winston
    Hello, I've been having with an objective-c class which appears to be losing its pointer reference between methods of the same class. In the MyTableViewController.h file, I declare: @interface SettingsTableViewController : UITableViewController <UITextFieldDelegate>{ OCRAppDelegate *delegate; } MyTableViewController.m file - (id) init { self = [ super initWithStyle: UITableViewStyleGrouped ]; delegate = [(OCRAppDelegate *)[[UIApplication sharedApplication] delegate] retain]; } The problem is when the "MyTableViewController" view appears again and a different method is executed within that same class, the delegate pointer (which was assigned during the init method) is no longer there. I tried to retain, but to no avail. Would anyone know why this is, it seems like perhaps it is a fundamental Objective-C issue which I am missing. Appreciate your help. Thanks, Winston

    Read the article

  • Position a UIView at the middle of a UITableView with CGRectZero frame

    - by Thomas Joulin
    Hi, I have a UITableViewController view a UITableView that I alloc/init with a frame of CGRectZero : self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; I want to add a view at the middle of the tableView (a loading view with a UIActivityIndicatorView and a UILabel), but I don't know how to position it, since I don't know the tableView frame. x = (self.tableview.frame.size.width - loadingView.frame.size.width) / 2.0; y = (self.tableview.frame.size.height - loadingView.frame.size.height) / 2.0; [loadingView setCenter:CGPointMake(x, y)]; I did init my tableView with CGRectZero frame so it can take the whole place available on screen (which it did), but I thought its frame would update or something. Any ideas ? Thanks !

    Read the article

  • NSMutable String "Out of scope"

    - by Garry
    I have two NSMutableString objects defined in my viewController's (a subclass of UITableViewController) .h file: NSMutableString *firstName; NSMutableString *lastName; They are properties: @property (nonatomic, retain) NSMutableString *firstName; @property (nonatomic, retain) NSMutableString *lastName; I synthesis them in the .m file. In my viewDidLoad method - I set them to be blank strings: firstName = [NSMutableString stringWithString:@""]; lastName = [NSMutableString stringWithString:@""]; firstName and lastName can be altered by the user. In my cellForRowAtIndexPath method, I'm trying to display the contents of these strings: cell.detailTextLabel.text = [NSString stringWithFormat:@"%@ %@", firstName, lastName]; but this is causing the app to crash as soon as the view controller is displayed. Using the debugger, it seems that both firstName and lastName are "out of scope" or that they don't exist. I'm new to Xcode but the debugger seems to halt at objc_msgSend. What am I doing wrong?

    Read the article

  • load animationImage from a table view Controller

    - by ackoverflow
    I use a UITableViewController to display a list of items, and one of the items selection must lead to a photo gallery created with animationImages. I usually declare the controllers associated to the first level selection with something like : MyController *myController = [[MyController alloc] initWithStyle:UITableViewStylePlain]; myController.title = @"title 1"; myController.rowImage = [UIImage imageNamed:@"myControllerIcon.png"]; .. But I believe a UIViewController is needed to use animationImages.. How can I display a image animation directly from a table view ?

    Read the article

  • iphone - UIViewController header view errors

    - by Fiona
    Hi there, So to give a little background: I've an app that has a UITableViewController- (ContactDetailViewController) In this view at the top, I require a few labels and buttons, followed by a group style tableview. So I've created a nib file containing these elements. (ContactHeaderView.xib) Then in the viewDidLoad of ContactDetailViewController I've loaded this nib as the headerView. See implementation file below: #import "ContactDetailViewController.h" #import "DisplayInfoViewController.h" #import "ActionViewController.h" @implementation ContactDetailViewController @synthesize name; @synthesize date; @synthesize nextAction; @synthesize nameLabel; @synthesize usernameLabel; @synthesize nextActionTextField; @synthesize dateLabel; @synthesize contactInfoButton; @synthesize backgroundInfoButton; @synthesize actionDoneButton; - (void)viewDidLoad { [super viewDidLoad]; } - (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; } #pragma mark Table view methods - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 3; } - (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { if (section == 0){ UIViewController *chv = [[[UIViewController alloc] initWithNibName:@"ContactHeaderView" bundle:nil] autorelease]; // self.nameLabel.text = self.name; return chv.view; }else{ return nil; } } - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ return 300.0; } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } // Set up the cell... return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; } /* // Override to support conditional editing of the table view. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the specified item to be editable. return YES; } */ - (void)dealloc { [name release]; [date release]; [nextAction release]; [nameLabel release]; [usernameLabel release]; [nextActionTextField release]; [dateLabel release]; [contactInfoButton release]; [backgroundInfoButton release]; [actionDoneButton release]; [super dealloc]; } -(IBAction)displayContactInfo:(id)sender{ DisplayInfoViewController *divc = [[DisplayInfoViewController alloc] init]; divc.textView = self.nextAction; divc.title = @"Contact Info"; [self.navigationController pushViewController:divc animated:YES]; [divc release]; } -(IBAction)displayBackgroundInfo:(id)sender{ DisplayInfoViewController *divc = [[DisplayInfoViewController alloc] init]; divc.textView = self.nextAction; divc.title = @"Background Info"; [self.navigationController pushViewController:divc animated:YES]; [divc release]; } -(IBAction)actionDone:(id)sender{ ActionViewController *avc = [[ActionViewController alloc] init]; avc.title = @"Action"; avc.nextAction = self.nextAction; [self.navigationController pushViewController:avc animated:YES]; [avc release]; } @end Here's the Header File: #import <UIKit/UIKit.h> @interface ContactDetailViewController : UITableViewController { NSString *name; NSString *date; NSString *nextAction; IBOutlet UILabel *nameLabel; IBOutlet UILabel *usernameLabel; IBOutlet UITextField *nextActionTextField; IBOutlet UILabel *dateLabel; IBOutlet UIButton *contactInfoButton; IBOutlet UIButton *backgroundInfoButton; IBOutlet UIButton *actionDoneButton; } @property (nonatomic, retain) NSString *name; @property (nonatomic, retain) NSString *date; @property (nonatomic, retain) NSString *nextAction; @property (nonatomic, retain) IBOutlet UILabel *nameLabel; @property (nonatomic, retain) IBOutlet UILabel *usernameLabel; @property (nonatomic, retain) IBOutlet UITextField *nextActionTextField; @property (nonatomic, retain) IBOutlet UILabel *dateLabel; @property (nonatomic, retain) IBOutlet UIButton *contactInfoButton; @property (nonatomic, retain) IBOutlet UIButton *backgroundInfoButton; @property (nonatomic, retain) IBOutlet UIButton *actionDoneButton; -(IBAction)displayContactInfo: (id)sender; -(IBAction)displayBackgroundInfo: (id)sender; -(IBAction)actionDone: (id)sender; @end However when I run it, I get the following error message: * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key nameLabel.' In IB I've hooked up the labels/buttons/textbox to the File's Owner (set the File's Owner Class to: ContactDetailViewController) Anyone any idea what I'm doing wrong? Regards, Fiona

    Read the article

  • Trying to understand NavigationController retain count for ViewControllers on its stack

    - by sharkan
    I have an UITableViewController as the rootViewController for my navigatorController. When I press a table cell I do the following: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { MessageHistory *msg = (MessageHistory *)[[self fetchedResultsController]objectAtIndexPath:indexPath]; ConversationViewController *chatController = [[ConversationViewController alloc]initWithNibName:@"ConversationView" bundle:nil andUser:msg.user]; [self.navigationController pushViewController:chatController animated:YES]; [chatController release]; But when I'm returning from the chatController (using the back button on the navbar) I get “EXC_BAD_ACCESS” commenting //[chatController release]; solves the problem. How? I thought when pushing to the navigationController adds a retain count and when pop from it release it? Also I believe if I'm not including the release after pushing to the navcontroller I'm generating a leak. Any idea what's happening here?

    Read the article

  • How can I flip a UITableView?

    - by Sheehan Alam
    I am trying to flip a UITableViewController but I don't think I am doing it properly: LeaderBoardTableViewController* leaderBoardView = [[[LeaderBoardTableViewController alloc] initWithNibName:@"LeaderBoardTableViewController" bundle:nil]autorelease]; //[self.navigationController pushViewController:leaderBoardView animated:YES]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:[self view] cache:YES]; [self.view addSubview:leaderBoardView]; [UIView commitAnimations]; I believe the culprit is in the line: [self.view addSubview:leaderBoardView]; But am not sure how to resolve.

    Read the article

  • Overriding properties of child view controller vs setting them via parent view controller

    - by robinjam
    If you want to modify the default behaviour of a View Controller by changing the value of one of its properties, is it considered better form to instantiate the class and set its property directly, or subclass it and override the property? With the former it would become the parent View Controller's responsibility to configure its children, whereas with the latter the children would effectively configure themselves. EDIT: Some more information: The class I am referring to is FetchedTableViewController, a subclass of UITableViewController that I made to display the results of a Core Data fetch operation. There are two places I want to display the results of a fetch, and they each have different fetch requests. I'm trying to decide whether it's better to create a subclass for each one, and override the fetchRequest property, or make it the responsibility of the parent controller to set the fetchRequest property for its children.

    Read the article

  • UITableViewCells loaded from NIB always nil

    - by Jason B
    I'm trying to create a simple form using a UITableViewController as documented in the Apple Developer Documentation here: http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html What I'm trying to do is located in the section entitled: "The Technique for Static Row Content" I've created a couple of UITableViewCells and added them to my nib, but when I try and access them to add them to the UITableView (in the cellForRowAtIndexPath method) they are always null. It's like they are not being properly loaded from the nib. I've double/triple/quadruple checked my code to make sure I'm doing it exactly as detailed in the docs, but no luck. Is there something obvious I'm missing here? Thanks

    Read the article

  • Navigation Items in Navigation Bar are not appearing?

    - by Sheehan Alam
    I am displaying a UITableViewController inside of a UITabBarController that is being presented modally: -(IBAction)arButtonClicked:(id)sender{ ARViewController* arViewController = [[[ARViewController alloc] initWithNibName:@"ARViewController" bundle:nil]autorelease]; LeaderBoardTableViewController* lbViewController = [[[LeaderBoardTableViewController alloc] initWithNibName:@"LeaderBoardTableViewController" bundle:nil]autorelease]; lbViewController.title = @"Leaderboard"; arTabBarController = [[UITabBarController alloc] initWithNibName:nil bundle:nil]; arTabBarController.viewControllers = [NSArray arrayWithObjects:arViewController, lbViewController, nil]; arTabBarController.selectedViewController = arViewController; [self presentModalViewController:arTabBarController animated:YES]; } In my viewDidLoad for arViewController method I am setting the navigation items: - (void)viewDidLoad { [super viewDidLoad]; // Uncomment the following line to preserve selection between presentations. self.clearsSelectionOnViewWillAppear = NO; self.title = @"AR"; leaderBoardButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemOrganize target:self action:@selector(leaderBoardButtonClicked:)]; self.navigationItem.rightBarButtonItem = leaderBoardButton; } My navigation bar doesn't appear when it is inside of the UITabBarController, but when I push the view itself I am able to see it. What am I missing?

    Read the article

  • Problem adding UIBarButtonItems to a ToolBar

    - by Olivier de Jonge
    I have a UINavigationController with a UITableViewController in it. I want to show a ToolBar on the bottom with UIBarButtonItem's. The ToolBar is showing up, but the buttons won't appear. Anyone knows why? - (void)viewDidLoad { [super viewDidLoad]; [[self navigationItem] setTitle:@"Selections List"]; [[self navigationItem] setRightBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addProjectSearch:)] autorelease]]; [[self navigationItem] setLeftBarButtonItem:[self editButtonItem]]; [[super tableView] setDataSource: self]; [[super tableView] setDelegate: self]; //Toolbar UIBarButtonItem * logoutButton = [[[UIBarButtonItem alloc] initWithTitle:@"Log out" style:UIBarButtonItemStylePlain target:self action:@selector(logOut:)]autorelease]; NSMutableArray * arr = [NSMutableArray arrayWithObjects:logoutButton, nil]; [[self navigationController] setToolbarHidden: NO animated:YES]; [[self navigationController] setToolbarItems:arr animated:YES]; }

    Read the article

  • Where I should call [object release] ?

    - by mongeta
    Hello, I've subclassed some UITextField and added some custom properties. In a UITableViewController, in the ViewDiDLoad I init them, and in the cellForRowAtIndexPath I add them to the cell with [cell.contentView addSubview:customTextField]; Each cell has a different customTextField as all of them are very different. Where I should call the [customTextField release] ? After I add them to the cell view ? If for example I call [self.tableView reloadData] my customTextField are going to be added again to the cell, so maybe I should change my approach in doing this ? thanks for the orientation ... regards, r.

    Read the article

  • How can I use a single UIToolbar with multiple different UIViewControllers?

    - by Aeonaut
    I have a simple app with two basic screens, a UIMapView and a UITableView. I'd like to have a toolbar at the bottom with a couple of buttons and a UISegmentedControl with two segments: "Map" and "Table". (The layout is similar to the Google Maps app that ships with the iPhone.) How can I keep the same toolbar while presenting either the UIMapView (with a UIMapViewController) or the UITableView (with a UITableViewController) when the user switches back and forth on the segmented control? Of course, I can just create an identical toolbar for each of the two different views and display them separately, but is there a better way?

    Read the article

  • Change the contents of a UITableView via a swipe?

    - by Mark
    Im currently using a UITableView like any other, and I am researching into the ability to perform a swipe gesture on the screen, which will then shift the contents of the visible table over to display new content for example: swiping right-to-left on the screen would change (via animation) the contents within each of the cells on screen to show new data. What I can do is detect a swipe on the cells, or perhaps on the UITableViewController, but what I dont know how to do two fold: 1) Change data in all cells (could you have a set of hidden views within a custom table cell that animate in and out of each cell per swipe?) 2) How can you do this to all cells? Thanks a lot Mark

    Read the article

  • Problems with UITableView when loading the view into the main window

    - by GuidoMB
    I've created a sub class of UITableViewController named LoginViewController with the XIB file using XCode. Then I opened the XIB file with IB and set the table's style to grouped. Finally I wrote the following code: - (void)applicationDidFinishLaunching:(UIApplication *)application { LoginViewController *loginViewController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:[NSBundle mainBundle]]; [window addSubview: loginViewController.view]; window.backgroundColor = [UIColor blueColor]; [window makeKeyAndVisible]; [window layoutSubviews]; } I set the window's background color to blue for you to see what the problem is. I put a link to the screenshot If I don't use the table style grouped the problem does not occur

    Read the article

  • IPhone: Controllers, Delagates, DataSources, etc all in one class?

    - by MLS
    Hi All, I am learning iPhone programming. I am starting with a simple example of displaying recently used documents in a UITableView. What I am confused about is why do I need to have several classes and why cant I just use one? Example, My class is called RecentFileList. I need to implement controller, delegate and datasource as well as the actual table view. Can't I just do this all in my RecentFileList Class versus having to create a RecentFileListDelegate RecentFileListController, RecentFileListDataSource class, etc, etc. Related to this can one define a class like: @interface FileListView : NSObject <UITableViewDelegate> <UITableViewController> <UITableViewDataSource { // code } @end or would I just do the work to make my class a delegate and controller in init()?

    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

  • When the current toolbar is touched previous toolbar items are activated.

    - by srikanth rongali
    I have a UIToolBar *toolbar1. I have 3 buttons on the toolbar. And the tool bar is at the bottom of the view. The buttons are like library button, moreApps button, recordVideo button. If I touch the library button a new view(a UITableViewController) appears. I used presentModelViewController for it. If I touch moreApps button a new view (a UIViewController) appears and it loaded from http//. The recordButton touch gives another UIViewController view. When the moreApps button is touched and the view is loaded, it have the content from web and a UIToolBar *toolbar2 at the bottom the view. It has a refresh button and done button. The problem is when I touch the toolbar2 (not on the refresh button and done button) the previous views button are activated and corresponding views of previous buttons(library button, playVideo button) are loaded. I am not able to understand about this problem. Thank you.

    Read the article

  • Read Core data in Serial Queue for iPhone app

    - by user1277209
    I have an app which uses Core data and the values are fetched from a link on internet. This runs absolutely fine when I am creating a serial queue in AppDelegate and I am not facing any problem with the same. Now, when I am trying to re-create similar scenario in a UITableViewController and executing the same in a serial queue but when the control reaches NSError *error; NSArray *match = [context executeFetchRequest:fetchRequest error:&error]; execution control disappears and then this code remains in the execution till eternity. Can anyone help me with what exactly is wrong here? FYI, I am passing the same ManagedObjectContext to the serial queue.

    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

  • Problem in to navigate on UITableView on the UIButtonClick which is present in UITabBarController sc

    - by Rajendra Bhole
    Hi, I develop an application in which i want to on UIButton Click the application navigate on UITableViewcontroller class.The UIButton is already on UITabBarController during the navigation the tab bar should be visible.The calling method in first tab bar controller class is, [appDelegate.nvcHome pushViewController:itemMenuTable animated:YES]; [itemMenuTable release]; itemMenuTable = nil; But it given me the following problem in GDB, Application tried to push a nil view controller on target . Also i want to display the icon and title of UITabBarController in programmatically, the code is, homeViewControllerLink = [[homeViewController alloc]initWithNibName:@"homeViewController" bundle:nil]; nvcHome = [[UINavigationController alloc]initWithRootViewController:homeViewControllerLink]; nvcHome.navigationBar.barStyle = UIStatusBarStyleBlackOpaque; UIImage *imgHomeTab = [UIImage imageNamed:@"home"]; [nvcHome.tabBarItem initWithTitle:@"Home" image:imgHomeTab tag:101]; [homeViewControllerLink release]; But it does not display when i running my app on iphone simulator.

    Read the article

  • Problem in building a tab bar inside navigation controller

    - by Heba
    Hello Everyone! I am really frustrated and I rally hope that you will help me to solve this problem! I'm trying to build a tab bar inside a navigation controller. I used this template provided by WiredBob. My problem is that I want to add more bar items to the tab bar, but I keep getting crash! From the log: 2010-05-24 00:15:43.469 NavTab[9315:207] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "AnnView" nib but didn't get a UITableView.' Also, I tried to fix the size of the a view in IB to fit in with the tab bar, but I couldn't! It was unchangeable. Thanks in advance :-)

    Read the article

  • port an iOS (iPhone) app to mac?

    - by William Jockusch
    Is there a preferred way to go about this? The app in question is not too large . . . single-player game that I wrote over the course of a couple of months. EDIT: I should add that I have no experience with mac development . . . outside of what comes naturally with being an iOS developer. EDIT: Classes heavily used in the game: subclasses of NSObject, UIView, and UIViewController. I don't know much about NSView, but I'm pretty sure all the UIView stuff will work in that class. Also some use of UITableViewController. I do also have Game Center, but I can leave that part out for now. There is no multi-touch.

    Read the article

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