Search Results

Search found 439 results on 18 pages for 'navigationcontroller'.

Page 9/18 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Invocation of ViewDidLoad after initWithNibName

    - by live2dream95
    It appears that ViewDidLoad() is sent to a ViewController only after its View is physically displayed (i.e. via NavigationController pushViewController), and not immediately after initWithNibName(). Is this a behavior I can rely on? I would like to get the chance to set the member variables of my view so that all the members are valid by the time ViewDidLoad() is invoked.

    Read the article

  • Can i pop to Specific ViewController?

    - by Ankit Vyas
    Hello!I am using Navigation Based Application.I push First ViewController to Second ViewController and From Second ViewController to Third ViewController Now I want to Pop From Third ViewController to First ViewController.I am Performing This task using the Below Code but i application get's Terminate.Please any body give me some proper Guidelines.I can't use pop to RootViewController because it's Different ViewController.Thanks in Advance... In Third ViewControler i have Written this: FirstViewCtr *x=[[FirstViewCtr alloc] initWithNibName:@"FirstViewCtr" bundle:nil]; [self.navigationController popToViewController:x animated:NO];

    Read the article

  • Setting the UIImagePickerController delegate throws a warning about UINavigationControllerDelegate

    - by synic
    The code: UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypeCamera; [self.navigationController presentModalViewController:picker animated:YES]; [picker release]; The warning, which shows up on the picker.delegate = self; line: Class 'CardEditor' does not implement the 'UINavigationControllerDelegate' protocol Why does the UIImagePickerController care if my class implements the UINavigationControllerDelegate protocol?

    Read the article

  • strange behavior when changing UINavigationController backItem title

    - by Rafael
    Hi, I'm changing the back button item title in the viewDidAppear of a controller in the following way: self.navigationController.navigationBar.backItem.title = @"Previous"; It changes the tittle properly, but the I'm having a strange behaviour. When I select the "previous" button, it changes the tittle of the controller that is up in the stack (i.e the parent controller now has the title "Previous". Do you now why this happened ??? Thanks in advanced for your help.

    Read the article

  • iPhone - Tweak the UINavigationController to show a UINavigationBar made into IB

    - by Oliver
    Hello, I've build a UINavigationBar into Interface Builder, and I have a NavigationController into my app. I'd like to make the one use the other to work. Just to manage the bar into IB and let the controller use it as its view (and adding by itself the Back button if needed), or in another way to do the same thing, let the NavBar use the navcontroller to adjust its display. Do you see a way to do this ? If not, I really don't see the use of the NavigationBar proposed into IB.

    Read the article

  • Updating DetailViewController from RootController

    - by Stefano Salmaso
    I'm trying to create an iPad application with a similar user interface to Apple's Mail application, i.e: RootView controller (table view) on the left hand side of the split view for navigation with a multiple view hierarchy. When a table cell is selected a new table view is pushed on the left hand side The new view on the left side can update the detail view. I can accomplish both tasks BUT NOT TOGETHER. I mean I can make a multi-level table view in the RootController.(HERE you can find the working source code). Or I can make a single-level table view in the RootController which can update the detailViewController (here there is the source code:http://www.megaupload.com/?d=D6L0463G). Can anyone tell me how to make a multi-level table in the RootController which can update a detailViewController? There is more source code at the link but below is the method in which I presume I have to declare a new detailViewController (which has to be put in the UISplitViewController): - (void)tableView:(UITableView *)TableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row]; //Get the children of the present item. NSArray *Children = [dictionary objectForKey:@"Children"]; // if([Children count] == 0) { /* Create and configure a new detail view controller appropriate for the selection. */ NSUInteger row = indexPath.row; UIViewController <SubstitutableDetailViewController> *detailViewController = nil; if (row == 0) { FirstDetailViewController *newDetailViewController = [[FirstDetailViewController alloc]initWithNibName:@"FirstDetailView" bundle:nil]; detailViewController = newDetailViewController; } if (row == 1) { SecondDetailViewController *newDetailViewController = [[SecondDetailViewController alloc]initWithNibName:@"SecondDetailView" bundle:nil]; detailViewController = newDetailViewController; } // Update the split view controller's view controllers array. NSArray *viewControllers = [[NSArray alloc] initWithObjects:self.navigationController, detailViewController, nil]; splitViewController.viewControllers = viewControllers//nothing happens..... [viewControllers release];// } else { //Prepare to tableview. RootViewController *rvController = [[RootViewController alloc]initWithNibName:@"RootViewController" bundle:[NSBundle mainBundle]]; //Increment the Current View rvController.current_level += 1; //Set the title; rvController.current_title = [dictionary objectForKey:@"Title"]; //Push the new table view on the stack [self.navigationController pushViewController:rvController animated:YES]; rvController.tableDataSource = Children; [rvController.tableView reloadData]; //without this instrucion,items won't be loaded inside the second level of the table [rvController release]; } }

    Read the article

  • I want to get the value from one class (SearchTableViewController.m) to another class (HistoryTableV

    - by ahmet732
    #import <UIKit/UIKit.h> @class SearchDetailViewController; @interface SearchTableViewController : UITableViewController <UISearchBarDelegate, UITableViewDelegate, UITableViewDataSource>{ IBOutlet UITableView *myTableView; NSMutableArray *tableData;//will be storing data that will be displayed in table. //Search array den buna aktarma yapcaz ilerde görceksin. NSMutableArray *searchedData;//will be storing data matching with the search string UISearchBar *sBar;//search bar NSMutableArray *searchArray; // It holds the medicines that are shown in tableview SearchDetailViewController * searchDetailViewController; NSMutableArray *deneme; } @property(nonatomic,retain)UISearchBar *sBar; @property(nonatomic,retain)IBOutlet UITableView *myTableView; @property(nonatomic,retain)NSMutableArray *tableData; @property(nonatomic,retain)NSMutableArray *searchedData; @property (nonatomic, retain) NSMutableArray *searchArray; @property (nonatomic, retain) SearchDetailViewController *searchDetailViewController; @property (nonatomic, copy) NSMutableArray *deneme; @end SearchTableViewController.m - (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]; **deneme= [[NSMutableArray alloc]init]; deneme=[tableData objectAtIndex:indexPath.row];** ****NSLog(@"my row = %@", deneme);**// I holded one of the selected cells here** HistoryTableViewController.m - (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]; **SearchTableViewController *obj= [[SearchTableViewController alloc]init];** **NSLog(@"my 2nd row= %@", [obj deneme]); //it prints nil** } My project is TabBar. There are two buttons on it- Search and History. I want to display selected items in a table in History tab. But i can not bring the selected item from SearchTableViewController.m to the class (HistoryTableViewController.m) The problem is : I can hold one of the selected items in an array (named deneme)from table in SearchTableViewController.m but i can not take it to HistoryTableViewController.m. It prints nil in console screen.... If I can make it visible in History class, I display those selected items on table. Please help me !!!

    Read the article

  • Remove objects from UINavigationController

    - by Joshep Freeman
    I would like to know if there is a way to know which objects [UIViewControllers?] are stored inside [self navigationController] (I'm guessing they are stored there with pushViewController?), and if there is a way to remove such objects. Consider this scenario: 1.- Show "Presentation screen" (a logo) 2.- Wait 2 seconds 3.- Push "Data screen" (no need for "Presentation screen" anymore but it's stored in Memory) Thanks for your time.

    Read the article

  • performSelectorInBackground, notify other viewcontroller when done.

    - by Michiel
    Hi, I have a method used to save an image when the user clicks Save. I use performSelectorInBackground to save the image, the viewcontroller is popped and the previous viewcontroller is shown. I want the table (on the previousUIViewController) to reload its data when the imagesaving is done. How can I do this? The save method is called like this: [self performSelectorInBackground:@selector(saveImage) withObject:nil]; [self.navigationController popViewControllerAnimated:YES];

    Read the article

  • UInavigationcontroller and UItableviews

    - by sudhakarilla
    I have one issue with UInavigationcontroller In my firstview i have button.If i click that button it should open tableview. if i click that tableviewcell is select the nextview willbe open.In my nextview i have backbutton click return to the tableview.if doesnot navigationcontroller. Please help in this issue.

    Read the article

  • Saving data in custom class via AppDelegate

    - by redspike
    I can't seem to save data to a custom instance object in my AppDelegate. My custom class is very simple and is as follows: Person.h ... @interface Person : NSObject { int _age; } - (void) setAge: (int) age; - (int) age; @end Person.m #import "Person.h" @implementation Person - (void) setAge:(int) age { _age = age; } - (int) age { return _age; } @end I then create an instance of Person in the AppDelegate class: AppDelegate.h @class Person; @interface AccuTaxAppDelegate : NSObject <UIApplicationDelegate> { ... Person *person; } ... @property (nonatomic, retain) Person *person; @end AppDelegate.m ... #import "Person.h" @implementation AccuTaxAppDelegate ... @synthesize person; - (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after app launch [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; } - (void)applicationWillTerminate:(UIApplication *)application { // Save data if appropriate } #pragma mark - #pragma mark Memory management - (void)dealloc { [navigationController release]; [window release]; [person release]; [super dealloc]; } @end Finally, in my ViewController code I grab a handle on AppDelegate and then grab the person instance, but when I try to save the age it doesn't seem to work: MyViewController ... - (void)textFieldDidEndEditing:(UITextField *)textField { NSString *textAge = [textField text]; int age = [textAge intValue]; NSLog(@"Age from text field::%i", age); AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; Person *myPerson = (Person *)[appDelegate person]; NSLog(@"Age before setting: %i", [myPerson age]); [myPerson setAge:age]; NSLog(@"Age after setting: %i", [myPerson age]); [textAge release]; } ... The output of the above NSLogs are: [Session started at 2010-05-04 18:29:22 +0100.] 2010-05-04 18:29:28.260 AccuTax[16235:207] Age in text field:25 2010-05-04 18:29:28.262 AccuTax[16235:207] Age before setting: 0 2010-05-04 18:29:28.263 AccuTax[16235:207] Age after setting: 0 Any ideas why 'age' isn't being stored? I'm relatively new to Obj-C so please forgive me if I'm missing something very simple!

    Read the article

  • Changing the UIBackButtonItem title

    - by Alpinista
    I have a navigationController-based app. I want to change the title of the back button for the root view controller. I have tried the following code in the rootViewController's viewDidLoad method, but no success: self.navigationItem.backBarButtonItem.title = @"Back"; Any ideas?

    Read the article

  • simple question of pushViewController

    - by user217572
    messagecontroller is nothing but object of initialize nib file. [self.navigationController pushViewController:messageController animated:YES]; this statement executes in normal condition this statement also works on state maintainace testing , this line executes properly but not open new view ,why?

    Read the article

  • A question is related to state maintainance

    - by user217572
    my question is like that My 5 th view is Acontroller and it has 1 UIButton.when i click on this UIButton my Bcontroller's view opens.this operation wrks perfectly. but i'm actually doing state maintainanace.when i reach to 5 th view of Acontroller.after that i press home button and then when i again click on application as per my state maintainance code 5 th view of Acontroller opens .but when i click on it's UIButton Bcontroller's view not open.why A code of UIButton is as below [self.navigationController pushViewController:bcontroller animated:YES]; bcontroller is nothing but object of Bcontroller

    Read the article

  • Extra retain counts after initWithNibName

    - by optimisticmonkey
    I have extra retain counts after calling initWithNib. What could cause this? (There are no referencing outlets in the nib) StepViewController *stepViewController = [[StepViewController alloc] initWithNibName:@"StepViewController" bundle:nil]; [self.navigationController pushViewController:stepViewController animated:YES]; [stepViewController release]; NSLog(@"nextStep stepViewController retain count %i", [stepViewController retainCount]); the above results in a retain count of 3... Thanks for any advice on how to troubleshoot

    Read the article

  • TabBarController delegate is not working

    - by Zach
    Hi, Can any one help me, when i am using my UITabBarController delegate it is not working.. I called a delegate method like this.. - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { [self.navigationController popToRootViewControllerAnimated:NO]; }

    Read the article

  • a Problem to pass a string between 2 view controller (iPhone)

    - by Toma
    my problem is quite simple, but as a beginner, I'm lost :D I have to view controller : view one call view 2 like this : self.FacebookTypeRequest =@"favoris"; FaceBookViewController *viewcontrol = [[FaceBookViewController alloc]initWithNibName:@"FaceBookViewController" bundle:[NSBundle mainBundle]]; viewcontrol.title = @"FaceBook"; [self.navigationController pushViewController:viewcontrol animated:YES]; [viewcontrol release]; How can i send my string facebookTypeRequest to my view controller 2 ? Thanks for your help

    Read the article

  • Returning back to the viewController with segues

    - by umar
    This is my Hierarchy Navigation Controller --> Login Controller View --- > Register Controller View --> My Small Internal LeaderBoard View Now I am using segues (Push) to go to either LoginControllerView or LeaderBoardView Once I am on LoginControllerView and then RegisterControllerView I am using this code [self dismissViewControllerAnimated:YES completion:nil] However instead of returning me to LoginControllerView it is returning me back to NavigationController. How can I return to my LoginController

    Read the article

  • pass data between uiview

    - by user1312508
    I have a problem passing data between view. I can pass my NSMutableArray easily using : DetailViewController *detailNote = [self.storyboard instantiateViewControllerWithIdentifier:@"detailNote"]; detailNote.ArrayItem = [allAnotacionsEntries objectAtIndex:indexPath.row]; [self.navigationController pushViewController:detailNote animated:YES]; but I want to pass additional NSMutableArray to the view and i don´t know how to do it. Please anyone can help me ? Thanks

    Read the article

  • error prepareForSegue between a viewController and a tableViewController

    - by beta
    -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"My_TableView"]) { MyTableViewController *destViewController = segue.destinationViewController; destViewController.data = data; } } Hi, I have a problem doing a segue (modal) between a ViewController to a TableViewController. The name of the segue between the ViewController and the NavigationController is "My_TableView". Compiler gives me this error: unrecognized selector sent to instance 0x9275b50 what's the problem?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >