Search Results

Search found 284 results on 12 pages for 'pushviewcontroller'.

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

  • Can I push a modal view controller from within another modal view controller?

    - by Andy
    I've got a rootViewController that, at one point, displays a peoplePickerNavigationController. I'm trying to push a second view controller when my user selects a specific contact property, like so: -(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)picker shouldContinueAfterSelectingPerson:(ABPersonRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier { RuleBuilder *ruleBuilder = [[RuleBuilder alloc] initWithNibName:@"RuleBuilder" bundle:nil]; [self pushModalViewController:ruleBuilder animated:YES]; [ruleBuilder release]; return NO; } This compiles just fine, but when I run the code in the simulator and run through the peoplePicker, nothing happens when I select a contact property. On a whim, I added a [self dismissModalViewControllerAnimated:YES]; just before [ruleBuilder release]; and that dismisses the peoplePicker, but otherwise has no effect on my missing ruleBuilder. Any ideas?

    Read the article

  • Call pushview from a subview

    - by slaapwagen
    Hello everyone, Here is the thing. I currently have a tabBar controller, with several navigation controllers in it. Just like this : http://tof.canardpc.com/view/d27d1361-c81b-43a0-9b5b-abb13d78e422.jpg In my first navigation controller, i have a view controller called NewsViewsController. Here is its nib (see picture). My goal is to show/hide the subviews (with tableview inside) according to the position of the segmented control. This way, I can have two separates viewControllers for each tableview. This is actually working. And here is the result (see picture). My problem is the following one. When i try to click on a cell, the pushview doesn't work. Indeed my self.navigationController is null. How can i push my detail view using the parent navigation controller ? Is the architecture of my application wrong ? Thank you =)

    Read the article

  • Go from a ViewController, to an other section of a TabBar

    - by Seraphin
    Hi, I'm currently doing an application with 5 View Controllers and a tabBar on the bottom. For this application, I need to set up a button in viewController(1) which can send me to an other viewController(3), but without touching the tabBar (it will be hidden for the viewController(1)). I basically know how to use a tabBar, but I don't know wich functions I can use to do that. Thanks in advance! Séraphin

    Read the article

  • Swipe left/right to push next/previous details view

    - by Youssef
    I am working on a ios application, using storyboard. I have a simple table view with rows. Each row has a "key" string to identify it. When the user clicks on a row I push the next view "DetailsViewController" and pass the "key" as a parameter in the prepareForSegue method. The data in the second view will change based on the "key" passed. In the "DetailsViewController" I want to add a swipe gesture, when the user swipes right, I want to push the next details view. It will be as if he clicked on the next row in the table view. So to rephrase, the user has 2 ways of switching between items: he can click the item in the table view and the details view will show, he can then go back and select another item. Or he can click on a row, and in the details view he can swipe left and right to see the previous/next item. i added the uigesture recognizer: UISwipeGestureRecognizer *recognizer; recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)]; [recognizer setDirection:UISwipeGestureRecognizerDirectionRight]; [[self view] addGestureRecognizer:recognizer]; - (void) handleSwipe:(UISwipeGestureRecognizer *) sender { //I want to go to the next item in the tableview } I hope I was clear. Thank you.

    Read the article

  • Where can I find a list of pushViewController transitions?

    - by barfoon
    Hey everyone, Where can I find a list of transitions for bringing a new Viewcontroller onto the stack. My line of code is: [peoplePicker pushViewController:myDetail transition:6]; after selecting a contact. Where can I find a list of transitions, and why does "6" work correctly? Also I get a warning with this code saying it may not respond to transition, even though it produces the transition correctly. What is the proper way to do these animations? Thanks,

    Read the article

  • How to pushviewcontroller to a viewcontroller stored in a tabbaritem?

    - by Jann
    First of all I know this is a long question. REST ASSURED I have tried to figure it out on my own (see: StackOverflow #2609318). This is driving me BATTY! After trying and failing to implement my own EDIT feature in the standard moreNavigationController, I have decided to re-implement my own MORE feature. I did the following: Add a HOME view controller which I init with: initWithRootViewController Add 3 other default tabs with: ResortsListViewController *resortsListViewController; resortsListViewController = [[ResortsListViewController alloc] initWithNibName:@"ResortsListView" bundle:nil]; resortsListViewController.title = [categoriesDictionary objectForKey:@"category_name"]; resortsListViewController.tabBarItem.image = [UIImage imageNamed:@"whatever.png"]; resortsListViewController.navigationItem.title=@"whatever title"; localNavigationController = [[UINavigationController alloc] initWithRootViewController:resortsListViewController]; localNavigationController.navigationBar.barStyle = UIBarStyleBlack; [localControllersArray addObject:localNavigationController]; [localNavigationController release]; [resortsListViewController release]; Those work when i add them to the tabbar. (ie: click on them and it goes to the view controller) Then I add my own MORE view controller to the tabbar: MoreViewController *moreViewController; moreViewController = [[MoreViewController alloc] initWithNibName:@"MoreView" bundle:nil]; moreViewController.title = @"More"; moreViewController.tabBarItem.image = [UIImage imageNamed:@"more.png"]; moreViewController.navigationItem.title=@"More Categories"; localNavigationController = [[UINavigationController alloc] initWithRootViewController:moreViewController]; localNavigationController.navigationBar.barStyle = UIBarStyleBlack; [localControllersArray addObject:localNavigationController]; [localNavigationController release]; [moreViewController release]; Then tabBarController.viewControllers = localControllersArray; tabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlack; tabBarController.customizableViewControllers = [NSArray arrayWithObjects:nil]; tabBarController.delegate = self; That creates the necessary linkages. Okay, so far all is well. I get a HOME tab, 3 category tabs and a customized MORE tab -- which all work. in the MORE tab view controller I implement a simple table view that displays all the other tabs I have in rows. SINCE I want to be able to switch them in and out of the tabbar I created them JUST like i did the resortslistviewcontroller above (ie: as view controllers in an array). When I pull them out to display the title in the tableview (so the user can go to that "view") i simply do the following: // [myGizmoClass CategoryArray] holds the array of view controller tab bar items that are NOT shown on the main screen. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ... etc... UIViewController *Uivc = [[myGizmoClass plusCategoryArray] objectAtIndex:indexPath.row]; cell.textLabel.text = [Uivc title]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; } THIS is where it falls through: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { MyGizmoClass *myGizmoClass= [MyGizmoClass sharedManager]; UIViewController *tbi = [[myGizmoClass plusCategoryArray] objectAtIndex:indexPath.row]; NSLog(@"%@\n",[[tbi navigationItem ]title]); [self.navigationController pushViewController:tbi animated:YES]; } This is the error i get ("ATMs" is the title for the clicked tableview cell so i know the Uivc title is pulling the correct title and therefore the correct "objectatindex": 2010-04-09 11:25:48.222 MouseAddict[47485:207] ATMs 2010-04-09 11:25:48.222 MouseAddict[47485:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported' BIG QUESTION: How do i make the associated VIEW of the UIViewController *tbi show and get pushed into view? I am GUESSING that the UIViewController is the correct class for this tbl .. i am not sure. BUT i just wanna get the view so i can push it onto the stack. Can someone plz help?

    Read the article

  • iOS TableView crash don't know how. Here is the app

    - by jollyr0ger
    Hi! In my app that you can download here: http://ge.tt/2DDqfJa I've started a discussion but is died here iOS TableView crash loading different data The problem is when I back from viewing the YouTube video to the recipes list, the app crash... And when i select a category for the second time, where have to load a tableview with different data source, it crash. This is the crash log Program received signal: “EXC_BAD_ACCESS”. (gdb) bt #0 0x00f0da63 in objc_msgSend () #1 0x04b27ca0 in ?? () #2 0x00002665 in -[RecipesListController viewWillAppear:] (self=0x4b38a00, _cmd=0x6d81a2, animated=1 '\001') at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:67 #3 0x00370c9a in -[UINavigationController _startTransition:fromViewController:toViewController:] () #4 0x0036b606 in -[UINavigationController _startDeferredTransitionIfNeeded] () #5 0x0037283e in -[UINavigationController pushViewController:transition:forceImmediate:] () #6 0x04f49549 in -[UINavigationControllerAccessibility(SafeCategory) pushViewController:transition:forceImmediate:] () #7 0x0036b4a0 in -[UINavigationController pushViewController:animated:] () #8 0x00003919 in -[CategoryViewController tableView:didSelectRowAtIndexPath:] (self=0x4b27ca0, _cmd=0x6d19e3, tableView=0x500c200, indexPath=0x4b2d650) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/CategoryViewCotroller.m:104 #9 0x0032a794 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] () #10 0x00320d50 in -[UITableView _userSelectRowAtPendingSelectionIndexPath:] () #11 0x000337f6 in __NSFireDelayedPerform () #12 0x00d8cfe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ () #13 0x00d8e594 in __CFRunLoopDoTimer () #14 0x00ceacc9 in __CFRunLoopRun () #15 0x00cea240 in CFRunLoopRunSpecific () #16 0x00cea161 in CFRunLoopRunInMode () #17 0x016e0268 in GSEventRunModal () #18 0x016e032d in GSEventRun () #19 0x002c342e in UIApplicationMain () #20 0x00001c08 in main (argc=1, argv=0xbfffef58) at /Users/claudiocanino/Documents/iOS/CottoMangiato/main.m:15 Another bt log: (gdb) bt #0 0x00cd76a1 in __CFBasicHashDeallocate () #1 0x00cc2bcb in _CFRelease () #2 0x00002dd6 in -[RecipesListController setRecipesArray:] (self=0x6834d50, _cmd=0x4293, _value=0x4e3bc70) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:16 #3 0x00002665 in -[RecipesListController viewWillAppear:] (self=0x6834d50, _cmd=0x6d81a2, animated=1 '\001') at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:67 #4 0x00370c9a in -[UINavigationController _startTransition:fromViewController:toViewController:] () #5 0x0036b606 in -[UINavigationController _startDeferredTransitionIfNeeded] () #6 0x0037283e in -[UINavigationController pushViewController:transition:forceImmediate:] () #7 0x091ac549 in -[UINavigationControllerAccessibility(SafeCategory) pushViewController:transition:forceImmediate:] () #8 0x0036b4a0 in -[UINavigationController pushViewController:animated:] () #9 0x00003919 in -[CategoryViewController tableView:didSelectRowAtIndexPath:] (self=0x4b12970, _cmd=0x6d19e3, tableView=0x5014400, indexPath=0x4b2bd00) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/CategoryViewCotroller.m:104 #10 0x0032a794 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] () #11 0x00320d50 in -[UITableView _userSelectRowAtPendingSelectionIndexPath:] () #12 0x000337f6 in __NSFireDelayedPerform () #13 0x00d8cfe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ () #14 0x00d8e594 in __CFRunLoopDoTimer () #15 0x00ceacc9 in __CFRunLoopRun () #16 0x00cea240 in CFRunLoopRunSpecific () #17 0x00cea161 in CFRunLoopRunInMode () #18 0x016e0268 in GSEventRunModal () #19 0x016e032d in GSEventRun () #20 0x002c342e in UIApplicationMain () #21 0x00001c08 in main (argc=1, argv=0xbfffef58) at /Users/claudiocanino/Documents/iOS/CottoMangiato/main.m:15 Thanks

    Read the article

  • iOS TableView crash loading different data

    - by jollyr0ger
    Hi to all! I'm developing a simple iOS app where there is a table view with some categories (CategoryViewController). When clicking one of this category the view will be passed to a RecipesListController with another table view with recipes. This recipes are loaded from different plist based on the category clicked. The first time I click on a category, the recipes list is loaded and shown correctely. If i back to the category list and click any of the category (also the same again) the app crash. And I don't know how. The viewWillAppear is ececuted correctely but after crash. Can you help me? If you need the entire project I can zip it for you. Ok? Here is the code of the CategoryViewController.h #import <Foundation/Foundation.h> #import "RecipeRowViewController.h" @class RecipesListController; @interface CategoryViewController : UITableViewController { NSArray *recipeCategories; RecipesListController *childController; } @property (nonatomic, retain) NSArray *recipeCategories; @end The CategoryViewControoler.m #import "CategoryViewCotroller.h" #import "NavAppDelegate.h" #import "RecipesListController.h" @implementation CategoryViewController @synthesize recipeCategories; - (void)viewDidLoad { // Create the categories NSArray *array = [[NSArray alloc] initWithObjects:@"Antipasti", @"Focacce", @"Primi", @"Secondi", @"Contorni", @"Dolci", nil]; self.recipeCategories = array; [array release]; // Set background image UIImageView *bgImg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"sfondo_app.png"]]; [self.tableView setBackgroundView:bgImg]; [bgImg release]; [self.tableView reloadData]; [super viewDidLoad]; } - (void)viewDidUnload { self.recipeCategories = nil; // [childController release]; [super viewDidUnload]; } - (void)dealloc { [recipeCategories release]; // [childController release]; [super dealloc]; } #pragma mark - #pragma mark Table data source methods - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [recipeCategories count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellId = @"RecipesCategoriesCellId"; // Try to reuse a cell or create a new one UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellId]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellId] autorelease]; } // Get the right value and assign to the cell NSUInteger row = [indexPath row]; NSString *rowString = [recipeCategories objectAtIndex:row]; cell.textLabel.text = rowString; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; [rowString release]; return cell; } #pragma mark - #pragma mark Table view delegate methods - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (childController == nil) { childController = [[RecipesListController alloc] initWithStyle:UITableViewStyleGrouped]; } childController.title = @"Ricette"; childController.category = [indexPath row]; [self.navigationController pushViewController:childController animated:YES]; } @end The RecipesListController.h #import <Foundation/Foundation.h> #import "RecipeRowViewController.h" #define kRecipeArrayLink 0 #define kRecipeArrayDifficulty 1 #define kRecipeArrayFoodType 2 #define kRecipeAntipasti 0 #define kRecipeFocacce 1 #define kRecipePrimi 2 #define kRecipeSecondi 3 #define kRecipeContorni 4 #define kRecipeDolci 5 @class DisclosureDetailController; @interface RecipesListController : UITableViewController { NSInteger category; NSDictionary *recipesArray; NSArray *recipesNames; NSArray *recipesLinks; DisclosureDetailController *childController; } @property (nonatomic) NSInteger category; @property (nonatomic, retain) NSDictionary *recipesArray; @property (nonatomic, retain) NSArray *recipesNames; @property (nonatomic, retain) NSArray *recipesLinks; @end The RecipesListcontroller.m #import "RecipesListController.h" #import "NavAppDelegate.h" #import "DisclosureDetailController.h" @implementation RecipesListController @synthesize category, recipesArray, recipesNames, recipesLinks; - (void)viewDidLoad { // Set background image UIImageView *bgImg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"sfondo_app.png"]]; [self.tableView setBackgroundView:bgImg]; [bgImg release]; [self.tableView reloadData]; [super viewDidLoad]; } - (void)viewWillAppear:(BOOL)animated { if (self.recipesArray != nil) { // Release the arrays [self.recipesArray release]; [self.recipesNames release]; } // Load the dictionary NSString *path = nil; // Load a different dictionary, based on the category if (self.category == kRecipeAntipasti) { path = [[NSBundle mainBundle] pathForResource:@"recipes_antipasti" ofType:@"plist"]; } else if (self.category == kRecipeFocacce) { path = [[NSBundle mainBundle] pathForResource:@"recipes_focacce" ofType:@"plist"]; } else if (self.category == kRecipePrimi) { path = [[NSBundle mainBundle] pathForResource:@"recipes_primi" ofType:@"plist"]; } else if (self.category == kRecipeSecondi) { path = [[NSBundle mainBundle] pathForResource:@"recipes_secondi" ofType:@"plist"]; } else if (self.category == kRecipeContorni) { path = [[NSBundle mainBundle] pathForResource:@"recipes_contorni" ofType:@"plist"]; } else if (self.category == kRecipeDolci) { path = [[NSBundle mainBundle] pathForResource:@"recipes_dolci" ofType:@"plist"]; } NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path]; self.recipesArray = dict; [dict release]; // Save recipes names NSArray *array = [[recipesArray allKeys] sortedArrayUsingSelector: @selector(compare:)]; self.recipesNames = array; [self.tableView reloadData]; [super viewWillAppear:animated]; } - (void)viewDidUnload { self.recipesArray = nil; self.recipesNames = nil; self.recipesLinks = nil; // [childController release]; [super viewDidUnload]; } - (void)dealloc { [recipesArray release]; [recipesNames release]; [recipesLinks release]; // [childController release]; [super dealloc]; } #pragma mark - #pragma mark Table data source methods - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [recipesNames count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *RecipesListCellId = @"RecipesListCellId"; // Try to reuse a cell or create a new one UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:RecipesListCellId]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:RecipesListCellId] autorelease]; } // Get the right value and assign to the cell NSUInteger row = [indexPath row]; NSString *rowString = [recipesNames objectAtIndex:row]; cell.textLabel.text = rowString; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; [rowString release]; return cell; } #pragma mark - #pragma mark Table view delegate methods - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (childController == nil) { childController = [[DisclosureDetailController alloc] initWithNibName:@"DisclosureDetail" bundle:nil]; } childController.title = @"Dettagli"; NSUInteger row = [indexPath row]; childController.recipeName = [recipesNames objectAtIndex:row]; NSArray *recipeRawArray = [recipesArray objectForKey:childController.recipeName]; childController.recipeLink = [recipeRawArray objectAtIndex:kRecipeArrayLink]; childController.recipeDifficulty = [recipeRawArray objectAtIndex:kRecipeArrayDifficulty]; [self.navigationController pushViewController:childController animated:YES]; } @end This is the crash log Program received signal: “EXC_BAD_ACCESS”. (gdb) bt #0 0x00f0da63 in objc_msgSend () #1 0x04b27ca0 in ?? () #2 0x00002665 in -[RecipesListController viewWillAppear:] (self=0x4b38a00, _cmd=0x6d81a2, animated=1 '\001') at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:67 #3 0x00370c9a in -[UINavigationController _startTransition:fromViewController:toViewController:] () #4 0x0036b606 in -[UINavigationController _startDeferredTransitionIfNeeded] () #5 0x0037283e in -[UINavigationController pushViewController:transition:forceImmediate:] () #6 0x04f49549 in -[UINavigationControllerAccessibility(SafeCategory) pushViewController:transition:forceImmediate:] () #7 0x0036b4a0 in -[UINavigationController pushViewController:animated:] () #8 0x00003919 in -[CategoryViewController tableView:didSelectRowAtIndexPath:] (self=0x4b27ca0, _cmd=0x6d19e3, tableView=0x500c200, indexPath=0x4b2d650) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/CategoryViewCotroller.m:104 #9 0x0032a794 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] () #10 0x00320d50 in -[UITableView _userSelectRowAtPendingSelectionIndexPath:] () #11 0x000337f6 in __NSFireDelayedPerform () #12 0x00d8cfe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ () #13 0x00d8e594 in __CFRunLoopDoTimer () #14 0x00ceacc9 in __CFRunLoopRun () #15 0x00cea240 in CFRunLoopRunSpecific () #16 0x00cea161 in CFRunLoopRunInMode () #17 0x016e0268 in GSEventRunModal () #18 0x016e032d in GSEventRun () #19 0x002c342e in UIApplicationMain () #20 0x00001c08 in main (argc=1, argv=0xbfffef58) at /Users/claudiocanino/Documents/iOS/CottoMangiato/main.m:15 Another bt log: (gdb) bt #0 0x00cd76a1 in __CFBasicHashDeallocate () #1 0x00cc2bcb in _CFRelease () #2 0x00002dd6 in -[RecipesListController setRecipesArray:] (self=0x6834d50, _cmd=0x4293, _value=0x4e3bc70) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:16 #3 0x00002665 in -[RecipesListController viewWillAppear:] (self=0x6834d50, _cmd=0x6d81a2, animated=1 '\001') at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:67 #4 0x00370c9a in -[UINavigationController _startTransition:fromViewController:toViewController:] () #5 0x0036b606 in -[UINavigationController _startDeferredTransitionIfNeeded] () #6 0x0037283e in -[UINavigationController pushViewController:transition:forceImmediate:] () #7 0x091ac549 in -[UINavigationControllerAccessibility(SafeCategory) pushViewController:transition:forceImmediate:] () #8 0x0036b4a0 in -[UINavigationController pushViewController:animated:] () #9 0x00003919 in -[CategoryViewController tableView:didSelectRowAtIndexPath:] (self=0x4b12970, _cmd=0x6d19e3, tableView=0x5014400, indexPath=0x4b2bd00) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/CategoryViewCotroller.m:104 #10 0x0032a794 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] () #11 0x00320d50 in -[UITableView _userSelectRowAtPendingSelectionIndexPath:] () #12 0x000337f6 in __NSFireDelayedPerform () #13 0x00d8cfe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ () #14 0x00d8e594 in __CFRunLoopDoTimer () #15 0x00ceacc9 in __CFRunLoopRun () #16 0x00cea240 in CFRunLoopRunSpecific () #17 0x00cea161 in CFRunLoopRunInMode () #18 0x016e0268 in GSEventRunModal () #19 0x016e032d in GSEventRun () #20 0x002c342e in UIApplicationMain () #21 0x00001c08 in main (argc=1, argv=0xbfffef58) at /Users/claudiocanino/Documents/iOS/CottoMangiato/main.m:15 Thanks

    Read the article

  • iPhone: Grouped tables and navigation controller issues

    - by Jack Griffiths
    Hi there, I've set up a grouped table on my app, and pushing to new views works fine. Except for one thing. The titles and stack layout are all weird. Here's the breakdown: I have two sections in my table. When I tap on the first row in the first section, it takes me to the correct view, but the title of the new view is the name of the first row in the second section of the table. In turn, the second row in the first section's title is the second row in the second section's title. If I tap on the second row in the second section of the root view table, the navigation button goes to the second row in the first section of the table. So here's a diagram of my table: Table Section 1 Row 1 Row 2 Row 3 Table Section 2 Row A Row B Row C So if I tap on row 3, the title of the pushed view is Row C. The navigation button tells me to go back to Row 3, then eventually ending up at the root view. Here's my implementation file pushing the views: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //CSS if ([[arryClientSide objectAtIndex:indexPath.row] isEqual:@"CSS"]) { CSSViewController *css = [[CSSViewController alloc] initWithNibName:@"CSSViewController" bundle:nil]; [css setTitle:@"CSS"]; [self.navigationController pushViewController:css animated:YES]; } //HTML if ([[arryClientSide objectAtIndex:indexPath.row] isEqual:@"HTML"]) { HTMLViewController *html = [[HTMLViewController alloc] initWithNibName:@"HTMLViewController" bundle:nil]; [html setTitle:@"HTML"]; [self.navigationController pushViewController:html animated:YES]; } //JS if ([[arryClientSide objectAtIndex:indexPath.row] isEqual:@"JavaScript"]) { JSViewController *js = [[JSViewController alloc] initWithNibName:@"JSViewController" bundle:nil]; [js setTitle:@"JavaScript"]; [self.navigationController pushViewController:js animated:YES]; } //PHP if ([[arryServerSide objectAtIndex:indexPath.row] isEqual:@"PHP"]) { PHPViewController *php = [[PHPViewController alloc] initWithNibName:@"PHPViewController" bundle:nil]; [php setTitle:@"PHP"]; [self.navigationController pushViewController:php animated:YES]; } //SQL if ([[arryServerSide objectAtIndex:indexPath.row] isEqual:@"SQL"]) { SQLViewController *sql = [[SQLViewController alloc] initWithNibName:@"SQLViewController" bundle:nil]; [sql setTitle:@"SQL"]; [self.navigationController pushViewController:sql animated:YES]; } & the array feeding the table's data: - (void)viewDidLoad { [super viewDidLoad]; arryClientSide = [[NSArray alloc] initWithObjects:@"CSS",@"HTML",@"JavaScript",nil]; arryServerSide = [[NSArray alloc] initWithObjects:@"Objective-C", @"PHP",@"SQL",nil]; // arryResources = [[NSArray alloc] initWithObjects:@"HTML Colour Codes", @"Useful Resources", @"About",nil]; self.title = @"Select a Language"; [super viewDidLoad]; // Uncomment the following line to display an Edit button in the navigation bar for this view controller. // self.navigationItem.rightBarButtonItem = self.editButtonItem; } Any help would be greatly appreciated. Jack

    Read the article

  • How i pass my view to nib at run time(Dynamically) in viewController class?

    - by Rajendra Bhole
    Hi, I want to create viewController class programmatically in which the view of nib file of viewController is not fixed. I have a UntitledViewController class that contains 4 UIButtons: -(IBAction)buttonPressed:(id)sender{ if((UIButton *)sender == button1){ tagNumber = button1.tag; NewViewController *newVC = [[NewViewController alloc] init]; //newVC.tagN [self.navigationController pushViewController:newVC animated:YES]; NSLog(@"Button Tag Number:- %i", tagNumber); } if((UIButton *) sender == button2){ tagNumber = button2.tag; NewViewController *newVC = [[NewViewController alloc] init]; [self.navigationController pushViewController:newVC animated:YES]; } if((UIButton *) sender == button3){ tagNumber = button3.tag; NewViewController *newVC = [[NewViewController alloc] init]; [self.navigationController pushViewController:newVC animated:YES]; } if((UIButton *) sender == button4){ int x = tagNumber; tagNumber = button4.tag; NewViewController *newVC = [[NewViewController alloc] init]; newVC.untitledVC = self; [self.navigationController pushViewController:newVC animated:YES]; } } When I will click any one of the UIButtons, I want to create a new NewViewController class with button tag property but without fixed nib file. In NewViewController's loadView event I want to fix the view of the nib of NewViewController class using UIButton's tag property (In NewViewController.xib I'm creating 4 UIViews named view1, view2, view3 and view4). -(void)loadView{ [super loadView]; CGRect frame = CGRectMake(0, 0, 320, 480); UIView *newView = [[UIView alloc] initWithFrame:frame]; newView.tag = untitledVC.tagNumber; self.view1 = newView; } Now I want that when I click button1 the NewViewController will be generated with view1 and when I click button2 the NewViewController will be generated with view2 and so on with different implementation. Thanks.

    Read the article

  • UITableViewCell select even doesn't work

    - by saimun
    I had a page control(UIPageControl) on a view (UIViewController) with table view (UITableView) on each page, each page have own table and can go to different view controller. i add the codes in "didSelectRowAtIndexPath" which can go to next level, is works perfect when i test it in a table view by itself, but it doesn't works when i have page controller with it. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (pageNumber == 0) { PicturesViewController *picturesView = [[PicturesViewController alloc] init]; [self.navigationController pushViewController:picturesView animated:YES]; [picturesView release]; } else if (pageNumber == 1) { PictureDetailViewController *pictureDetailView = [[PictureDetailViewController alloc] init]; [self.navigationController pushViewController:pictureDetailView animated:YES]; [pictureDetailView release]; } else if (pageNumber == 2) { MessagesViewController *messagesView = [[MessagesViewController alloc] init]; [self.navigationController pushViewController:messagesView animated:YES]; [messagesView release]; } } here is the code, if view directly to this table view this code is work, how can i make it work under the pagecontrol??

    Read the article

  • Back button title not receiving previous view controller's title

    - by Prasanna
    I am pushing 2 view controllers in to navigation stack in ApplicationDidFinishLaunching. [navigationController pushViewController:favorites animated:NO]; [navigationController pushViewController:root animated:NO]; The app loads fine, but on the start screen, the back button title is simply "Back". I do have a title for the FavoritesViewController, and a navigationItem title setup to Favorites. Am I missing something? Appreciate your help.

    Read the article

  • Iphone App deve- Very basic table view but getting errors , trying for 2 days!! just for info using

    - by user342451
    Hi guys, trying to write this code since 2 days now, but i keep getting error, it would be nice if anyone could sort this out, thanks. Basically its the same thing i doing from the tutorial on youtube. awaiting a reply // // BooksTableViewController.m // Mybooks // // import "BooksTableViewController.h" import "BooksDetailViewController.h" import "MYbooksAppDelegate.h" @implementation BooksTableViewController @synthesize BooksArray; @synthesize BooksDetailViewController; /* - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) { // Initialization code } return self; } */ (void)viewDidLoad { [super viewDidLoad]; self.title = NSLocalizedString(@"XYZ",@"GOD is GREAT"); NSMutableArray *array = [[NSArray alloc] initWithObjects:@"H1",@"2",@"3",nil]; self.booksArray = array; [array release]; } /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview // Release anything that's not essential, such as cached data } 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 [self.booksArray count]; } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *identity = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identity]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:identity] autorelease]; } // Set up the cell... cell.textLabel.text = [booksArray objectAtIndex:indexPath.row]; return cell; } /* - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { booksDetailsViewControler *NC = [[booksDetailsViewControler alloc] initWithNibName:@"BooksDetailsView" bundle:nil]; [self.navigationController pushViewController:NC animated:YES]; //[booksDetailViewController changeProductText:[booksArray objectAtIndex:indexPath.row]]; } */ NSInteger row = [indexPath row]; if (self.booksDetailViewController == nil) { BooksiDetailViewController *aCellDetails = [[AartiDetailViewController alloc] initWithNibName:@" BooksDetailViewController" bundle:nil]; self.booksDetailViewController = aCellDetails; [aCellDetails release]; } booksDetailViewController.title = [NSString stringWithFormat:@"%@", [booksArray objectAtIndex:row]]; //DailyPoojaAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; //[delegate.AartiNavController pushViewController:aartiDetailsViewControler animated:YES]; [self.navigationController pushViewController:aartiDetailViewController animated:YES]; } /* NSInteger row = [indexPath row]; if (self.booksDetailsViewControler == nil) { AartiDetailsViewControler *aBookDetail = [[BooksDetailsViewControler alloc] initWithNibName:@"booksDetaislView" bundle:nil]; self.booksDetailsViewControler = aBookDetail; [aBookDetail release]; } booksDetailsViewControler.title = [NSString stringWithFormat:@"%@", [booksArray objectAtIndex:row]]; [self.navigationController pushViewController:booksDetailsViewControler animated:YES]; */ (void)dealloc { [aartiDetailViewController release]; [super dealloc]; } @end

    Read the article

  • Very basic table view but getting errors

    - by user342451
    Hi guys, trying to write this code since 2 days now, but i keep getting error, it would be nice if anyone could sort this out, thanks. Basically its the same thing i doing from the tutorial on youtube. awaiting a reply // // BooksTableViewController.m // Mybooks // // #import "BooksTableViewController.h" #import "BooksDetailViewController.h" #import "MYbooksAppDelegate.h" @implementation BooksTableViewController @synthesize BooksArray; @synthesize BooksDetailViewController; /* - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) { // Initialization code } return self; } */ - (void)viewDidLoad { [super viewDidLoad]; self.title = NSLocalizedString(@"XYZ",@"GOD is GREAT"); NSMutableArray *array = [[NSArray alloc] initWithObjects:@"H1",@"2",@"3",nil]; self.booksArray = array; [array release]; } /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview // Release anything that's not essential, such as cached data } #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 [self.booksArray count]; } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *identity = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identity]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:identity] autorelease]; } // Set up the cell... cell.textLabel.text = [booksArray objectAtIndex:indexPath.row]; return cell; } /* - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { booksDetailsViewControler *NC = [[booksDetailsViewControler alloc] initWithNibName:@"BooksDetailsView" bundle:nil]; [self.navigationController pushViewController:NC animated:YES]; //[booksDetailViewController changeProductText:[booksArray objectAtIndex:indexPath.row]]; } */ NSInteger row = [indexPath row]; if (self.booksDetailViewController == nil) { BooksiDetailViewController *aCellDetails = [[AartiDetailViewController alloc] initWithNibName:@" BooksDetailViewController" bundle:nil]; self.booksDetailViewController = aCellDetails; [aCellDetails release]; } booksDetailViewController.title = [NSString stringWithFormat:@"%@", [booksArray objectAtIndex:row]]; //DailyPoojaAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; //[delegate.AartiNavController pushViewController:aartiDetailsViewControler animated:YES]; [self.navigationController pushViewController:aartiDetailViewController animated:YES]; } /* NSInteger row = [indexPath row]; if (self.booksDetailsViewControler == nil) { AartiDetailsViewControler *aBookDetail = [[BooksDetailsViewControler alloc] initWithNibName:@"booksDetaislView" bundle:nil]; self.booksDetailsViewControler = aBookDetail; [aBookDetail release]; } booksDetailsViewControler.title = [NSString stringWithFormat:@"%@", [booksArray objectAtIndex:row]]; [self.navigationController pushViewController:booksDetailsViewControler animated:YES]; */ - (void)dealloc { [aartiDetailViewController release]; [super dealloc]; } @end

    Read the article

  • Iphone xCode - Navigation Controller on second xib view?

    - by Frames84
    Everything is fine, my navigation controller display's my 'Menu 1' item, but when i click it there appears to be a problem with the: [self.navigationController pushViewController:c animated:YES]; line it doesn't connect to the break point in the myClass file. so I think i've not joined something? but unsure what? my second view with the navigation controller doesn't have direct access to the AppDelegate so can't join it like i see in some tutorials. 1st view is just a button when clicked calls: [self presentModalViewController:mainViewController animated:YES]; my second View 'MainViewController' header looks like: @interface MainViewController :UITableViewController <UITableViewDelegate, UITableViewDataSource> { NSArray *controllers; UINavigationController *navController; } @property (nonatomic, retain) IBOutlet UINavigationController *navControllers; @property (nonatomic, retain) NSArray *controller; Then I have my MainViewController.m @synthesize controllers; @synthesize navController; - (void) viewDidLoad { NSMutableArray *array = [[NSMutaleArray alloc] init]; myClass *c = [[myClass alloc] initWithStyle:UITableViewStylePlain]; c.Title = @"Menu 1"; [array addObject:c]; self.Controllers = array; [array release]; } implemented numberOfRowsInSection and cellForRowAtIndexPath - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger row = [indexPath row]; myClass *c = [self.controllers objectAtIndex:row]; [self.navigationController pushViewController:c animated:YES]; // doesn't load myClass c // [self.navController pushViewController:c animated:YES]; } Also in interface designer I dragged a Navigation Controller onto my new XIB and changed the Root View Controller class to MainViewController and also connected the File Owner connector to the Navigation Controller to connect the navController Outlet. Thanks for you time.

    Read the article

  • Problem pushing multiple view controllers onto navigation controller stack

    - by Jim
    Hi, I am trying to push three view controllers onto the navigation controller. [self.navigationController pushViewController:one animated:YES]; [self.navigationController pushViewController:two animated:YES]; [self.navigationController pushViewController:three animated:YES]; The desired behavior is that view three will show, and when the back button is pressed it will go to view two and then to view one... What actually happens is that view one is visible and pressing back goes to view two and then back again it goes to view one. Which is to say that view one is shown instead of view three. Very strangely, looking at the viewController array of the navigationController after the calls above show the right entries, and looking at the visibleViewController property shows that it has view three in it... even though view one is visible. If i navigate to a sub view from the visible view one (that shows in the place of view three) and press back from that sub view... it goes to view three. It looks like it is showing view one, but knows it is on view three... I am completely confused... any ideas? Jim

    Read the article

  • Loading Views dynamically

    - by Dann
    Case 1: I have created View-based sample application and tried execute below code. When I press on "Job List" button it should load another view having "Back Btn" on it. In test function, if I use [self.navigationController pushViewController:jbc animated:YES]; nothing gets loaded, but if I use [self presentModalViewController:jbc animated:YES]; it loads another view haveing "Back Btn" on it. Case 2: I did create another Navigation Based Applicaton and used [self.navigationController pushViewController:jbc animated:YES]; it worked as I wanted. Can someone please explain why it was not working in Case 1. Does it has something to do with type of project that is selected? @interface MWViewController : UIViewController { } -(void) test; @end @interface JobViewCtrl : UIViewController { } @end @implementation MWViewController (void)viewDidLoad { UIButton* btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(80, 170, 150, 35); [btn setTitle:@"Job List!" forState:UIControlStateNormal]; [btn addTarget:self action:@selector(test) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:btn]; [super viewDidLoad]; } -(void) test { JobViewCtrl* jbc = [[JobViewCtrl alloc] init]; [self.navigationController pushViewController:jbc animated:YES]; //[self presentModalViewController:jbc animated:YES]; [jbc release]; } (void)dealloc { [super dealloc]; } @end @implementation JobViewCtrl -(void) loadView { self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; self.view.backgroundColor = [UIColor grayColor]; UIButton* btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(80, 170, 150, 35); [btn setTitle:@"Back Btn!" forState:UIControlStateNormal]; [self.view addSubview:btn]; } @end

    Read the article

  • Loading views dynamically

    - by Dan
    Case 1: I have created View-based sample application and tried execute below code. When I press on "Job List" button it should load another view having "Back Btn" on it. In test function, if I use [self.navigationController pushViewController:jbc animated:YES]; nothing gets loaded, but if I use [self presentModalViewController:jbc animated:YES]; it loads another view haveing "Back Btn" on it. Case 2: I did create another Navigation Based Applicaton and used [self.navigationController pushViewController:jbc animated:YES]; it worked as I wanted. Can someone please explain why it was not working in Case 1. Does it has something to do with type of project that is selected? @interface MWViewController : UIViewController { } -(void) test; @end @interface JobViewCtrl : UIViewController { } @end @implementation MWViewController (void)viewDidLoad { UIButton* btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(80, 170, 150, 35); [btn setTitle:@"Job List!" forState:UIControlStateNormal]; [btn addTarget:self action:@selector(test) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:btn]; [super viewDidLoad]; } -(void) test { JobViewCtrl* jbc = [[JobViewCtrl alloc] init]; [self.navigationController pushViewController:jbc animated:YES]; //[self presentModalViewController:jbc animated:YES]; [jbc release]; } (void)dealloc { [super dealloc]; } @end @implementation JobViewCtrl -(void) loadView { self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; self.view.backgroundColor = [UIColor grayColor]; UIButton* btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(80, 170, 150, 35); [btn setTitle:@"Back Btn!" forState:UIControlStateNormal]; [self.view addSubview:btn]; } @end

    Read the article

  • UITableViewController and viewForHeaderInSection problems

    - by Fiona
    Hello, So I need your help please! I've created a UITableViewController: ContactDetailViewController. In IB in the nib file, I've added a view ahead of the table view and hooked it up to headerView - a UIView declared in the .h file. I've also created a view: CustomerHeaderView However when I run the code below, Its throwing an exception at the following line: headerView = [[UIView alloc] initWithNibName:@"ContactHeaderDetail" bundle:nil]; The error being thrown is: 2010-05-20 10:59:50.405 OnePageCRM[19620:20b] * -[UIView initWithNibName:bundle:]: unrecognized selector sent to instance 0x3ca4fa0 2010-05-20 10:59:50.406 OnePageCRM[19620:20b] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '** -[UIView initWithNibName:bundle:]: unrecognized selector sent to instance 0x3ca4fa0' So any ideas anyone? Many thanks, Fiona // // ContactDetailViewController.m // OnePageCRM // // Created by Fiona Tighe on 19/05/2010. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import "ContactDetailViewController.h" #import "DisplayInfoViewController.h" #import "ActionViewController.h" #define SectionHeaderHeigth 200 @implementation ContactDetailViewController @synthesize name; @synthesize date; @synthesize headerView; @synthesize nextAction; @synthesize nameLabel; @synthesize usernameLabel; @synthesize nextActionTextField; @synthesize dateLabel; @synthesize notesTableView; @synthesize contactInfoButton; @synthesize backgroundInfoButton; @synthesize actionDoneButton; - (void)viewDidLoad { [super viewDidLoad]; // Uncomment the following line to display an Edit button in the navigation bar for this view controller. // self.navigationItem.rightBarButtonItem = self.editButtonItem; } - (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 2; } // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { int numOfRows; NSLog(@"section: %d", section); switch (section){ case 0: numOfRows = 0; break; case 1: numOfRows = 3; break; default: break; } return numOfRows; } - (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { if (section == 0){ headerView = [[UIView alloc] initWithNibName:@"ContactHeaderDetail" bundle:nil]; // headerView = [[UIView alloc] initWithNibName:@"ContactHeaderDetail" bundle:nil]; return headerView; }else{ return nil; } } - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ return SectionHeaderHeigth; } // 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; } */ /* // Override to support editing the table view. - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { // Delete the row from the data source [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES]; } else if (editingStyle == UITableViewCellEditingStyleInsert) { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view } } */ /* // Override to support rearranging the table view. - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { } */ /* // Override to support conditional rearranging of the table view. - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the item to be re-orderable. return YES; } */ -(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]; } - (void)dealloc { [name release]; [date release]; [nextAction release]; [nameLabel release]; [usernameLabel release]; [nextActionTextField release]; [dateLabel release]; [notesTableView release]; [contactInfoButton release]; [backgroundInfoButton release]; [actionDoneButton release]; [headerView release]; [super dealloc]; } @end

    Read the article

  • How to push UIViewController into UINavigationController from seperate UIView of different UIViewCon

    - by Kundan
    I have a UIViewController(AbcViewController) with NavigationController.AbcViewController uses UIView(AbcView) as its view. AbcView has a UITableView. I have set This TableView's datasource in AbcViewController and delegate in its SuperView i.e. AbcView. How will I push another UIViewController(XyzViewcontroller) into navigationController when I select a row in this table because it gives "error: request for member 'navigationController' in something not a structure or union" when I do this : [self.navigationController pushViewController:xyzViewcontroller animated:TRUE]; I also did this : AbcViewController *parentVC; [parentVC.navigationController pushViewController:xyzViewcontroller animated:TRUE]; Though it builds successfully but XyzViewcontroller's view does not appear. It does not push XyzViewcontroller's view into navigationController. Thanks For Any Help.

    Read the article

  • How should I load a xib into a detail view for a split view iPad objective app?

    - by editor
    I've got a split view iPad app with table view in the master pane. After drilling down several levels, each time loading a new .xib, I'd like one of the cells to trigger a web page load in the detail pane. Right now I can only get the web page .xib to load in the master pane side -- which is a master pain in my side. The basic load call where "URLWindow" is a class loaded with initWithNibName: [[self navigationController] pushViewController:URLWindow animated:YES]; I want to do this, but it doesn't seem to work: @interface @property (nonatomic, retain) IBOutlet DetailViewController *detailViewController; ... @implementation [[self detailViewController] pushViewController:URLWindow animated:YES]; How should I be loading the URLWindow .xib into a detail view for a split view detail pane?

    Read the article

  • UITabBarController With UINavigationController "more" Tab Issue

    - by Medlay
    UITabBarController with UINavigationController "more" tab issue There is a problem with using UINavigationController in UITabBarController. I have a TabBar  with 6 items. Of course, a standart item "more" appears, and there are two UINavigationControllers that didn't fit in a TabBar. The core of the problem is: when I'm working with visible items (a first four), UIViewController can be pushed  in an UINavigationController: [self.navigationController pushViewController:userDataViewController animated:YES]; If you call on in "more" and rearrange items in such way, that a visible UINavigationController gets into "more", when calling on it userDataViewController appears.  This  userDataViewController is the last, which has got in a stack and a Back button leads back to "more", but not to the controllers, that were before a userDataViewController appeared. I understand that in fact a selector pushViewController is called from "more", and it pushes my UINavigationController in a stack, and it's not good. Maybe, someone has faced such problem and could help me to solve it? Thank you forward.

    Read the article

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