Search Results

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

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

  • iPhone UINavigation Controller issue?

    - by NextRev
    I have 3 different xib's. I am able to go back and forth between view 1 and view 2 with the following code... This Code brings up the second view... -(IBAction)startButtonClicked:(id)sender{ self.gamePlayViewController = [[GamePlayViewController alloc] initWithNibName:@"GamePlayViewController" bundle:nil]; [self.navigationController pushViewController:gamePlayViewController animated:YES]; [GamePlayViewController release]; } This Code is executed in the second view and brings me back to the first view... -(IBAction)backButtonClicked{ [self.navigationController popViewControllerAnimated:YES]; } Now when I try to execute this code (in the second view) to get to the third view...I get SIGABRT and the app crashes...why does it work for the first view bringing up the second view, but not for the second view bringing up the 3rd view? -(IBAction)nextView{ self.thirdViewController = [[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil]; [self.navigationController pushViewController:thirdViewController animated:YES]; [thirdViewController release]; }

    Read the article

  • How do I hook up a custom tab bar build in IB to a UINavigationController Object instanced in XCODE?

    - by David Hsu
    What I did to create the custom NAV BAR: 1. Created an empty XIB and added a view with class UINavigationController. 2. Under the view I added the navigation bar and a left and right button onto the nav bar. 3. Control drag from "File Owner" to "View" Inside my class where I call the modal view navigation controller: SignupViewController *addController = [[SignupViewController alloc] initWithNibName:@"SignupViewController" bundle:nil]; // Create the navigation controller and present it modally. UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:addController]; navigationController.navigationBar = ///WHAT SHOULD GO HERE? [self presentModalViewController:navigationController animated:YES]; Thank in advance!

    Read the article

  • TTThumbView/TTPhotoView no autorotation

    - by ludo
    Hi, In my app I try to use the TTphotoView, so in a ViewController I push the TTphotoView with my navigationController like this: if(self.photoViewController == nil { PhotoViewController *viewController = [[PhotoViewController alloc] init]; self.photoViewController = viewController; viewController.hidesBottomBarWhenPushed = YES; [viewController release]; } [self.navigationController pushViewController:self.photoViewController animated:YES]; [self.navigationController  dismissModalViewControllerAnimated:YES] the problem is when the user rotate the device on the PhotoViewController nothing happen. EDIT : I can't believe people didn't have the same problem. If someone use the photoView in his application with his own navigation and not the TTNavigation can he tell me how did he push the ViewController?

    Read the article

  • Why am I getting this warning about my app delegate and CLLocationManageDelegate?

    - by Dan Ray
    Observe this perfectly simple UIViewController subclass method: -(IBAction)launchSearch { OffersSearchController *search = [[OffersSearchController alloc] initWithNibName:@"OffersSearchView" bundle:nil]; EverWondrAppDelegate *del = [UIApplication sharedApplication].delegate; [del.navigationController pushViewController:search animated:YES]; [search release]; } On the line where I get *del, I am getting a compiler warning that reads, Type 'id <UIApplicationDelegate>' does not conform to the 'CLLocationManagerDelegate' protocol. In fact, my app delegate DOES conform to that protocol, AND what I'm doing here has nothing at all to do with that. So what's up with that message? Secondary question: sometimes I can get to my navigationController via self.navigationController, and sometimes I can't, and have to go to my app delegate's property to get it like I'm doing here. Any hint about why that is would be very useful.

    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

  • detecting when nav controller popped to root

    - by phil swenson
    Here is my code: SignupController* signupController = [[SignupController alloc] initWithNibName:@"SignupController" bundle:nil]; [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; self.navigationController.title = @"MyNavController"; [self.navigationController pushViewController:signupController animated:YES]; [signupController release]; Unfortunately for me calling pushViewController is not synchronous, so the next line ([signupController release]) is executed immediately. I need to detect hen the signupController has popped back to the root so I can take the data from the signup controller and do a registration or login. Any ideas? Thanks

    Read the article

  • Navigating between 2 ViewControllers

    - by Kobe.o4
    Im using Navigation Controller for my ViewControllers,I set my importantViewController as something like this to be its RootView: UINavigationController *navControl = [[UINavigationController alloc] initWithRootViewController: vc]; [self presentModalViewController: navControl animated: YES]; Then, I pushView anotherView the FrontViewController like this: [self.navigationController pushViewController:vc animated:YES]; After a button is pressed in FrontViewController another view will be pushed ViewA but it is connected with another ViewController ViewB the same way as this AGAIN: [self.navigationController pushViewController:vc animated:YES]; (Which I think Im doing wrong when dismissing either of them with [self.navigationController popViewControllerAnimated:YES];) This is an illustration: My problem is, I need to navigate between View A and View B then when I dismiss either of them it will got back to FrontViewController. Like a child of a child View. Thanks.

    Read the article

  • How do I push a new controller via UIButton, nested in a UIScrollView?

    - by jimijon
    Hello - I have my views that are part of a tabBar. Each view has a navigationController. In one of my views I have an embeded xib component. This is a scrolling view with UIButtons inside it. I want to slide in another view, inside the navigationController when a person taps the button. I can get the taps, etc. BUT, I can't figure out how to find the controlling navigationController of that page to push the new view into. Nothing seems to work that I have tried. IS this possible? Thanks

    Read the article

  • Calling popToRootViewControllerAnimated causing crash. How should I be doing this?

    - by Lewis42
    The app is for taking body measurements. The user can say I want to measure: legs, arms and neck, in the settings tab and in the main tab there is a view which loops round to take each measurement. This is achieved like so: i have tab controller the first tab has a navigation controller the first view controller on the storyboard and has one segue to itself the board loops round until it has all the measurements then it segues to a different controller the problem is: if the user changes which measurements they are taking in the settings tab, the first tab needs to completely reload, as if the app was just starting up, clearing down the whole nav stack etc. at the moment the tab controller calls popToRootViewControllerAnimated on the navigation controller in the measurements tab, but this is causing a crash. Each screen has a slider control and a call to titleForRow:forComponent: is being called on a deleted view causing it to crash. What am I doing wrong?! Here's the tab bar controller code // TabBarController.m // #import "TabBarController.h" #import "TodaysMeasurementObject.h" #import "AppDelegateProtocol.h" #import "AddMeasurementViewController.h" #import "ReadPerson.h" #import "AppDelegate.h" @interface TabBarController () <UITabBarControllerDelegate> @end @implementation TabBarController bool resetWizardView = false; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { } return self; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.delegate = self; [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(measurementsSettingsUpdated:) name:@"MeasurementsSettingsUpdated" object:nil]; } - (void) measurementsSettingsUpdated:(NSNotification *) notification { // UINavigationController *navigationController = [self.viewControllers objectAtIndex:0]; // AddMeasurementViewController *addMeasurement = [[AddMeasurementViewController alloc] init]; // [navigationController setViewControllers: [[NSArray alloc] initWithObjects:addMeasurement, nil]]; resetWizardView = YES; } - (void) viewDidAppear:(BOOL)animated { if (![ReadPerson userHasRecords]) { [self setSelectedIndex:3]; } } - (void)orientationChanged:(NSNotification *)notification { // We must add a delay here, otherwise we'll swap in the new view // too quickly and we'll get an animation glitch [self performSelector:@selector(showGraphs) withObject:nil afterDelay:0]; } - (void)showGraphs { UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation; if (deviceOrientation == UIDeviceOrientationLandscapeLeft && !isShowingLandscapeView) { [self performSegueWithIdentifier: @"toGraph" sender: self]; isShowingLandscapeView = YES; } else if (deviceOrientation != UIDeviceOrientationLandscapeLeft && isShowingLandscapeView) { [self dismissModalViewControllerAnimated:YES]; isShowingLandscapeView = NO; } } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. } - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; [[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if(interfaceOrientation == UIInterfaceOrientationLandscapeRight) { [self performSegueWithIdentifier: @"toGraph" sender: self]; } return false; } - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { int tbi = tabBarController.selectedIndex; if (tbi == 0) { [[viewController view] setNeedsDisplay]; if (resetWizardView) { [(UINavigationController*)[self.viewControllers objectAtIndex:0] popToRootViewControllerAnimated: NO]; // ******* POP CALLED HERE ****** resetWizardView = false; } } } - (TodaysMeasurementObject*) theAppDataObject { id<AppDelegateProtocol> theDelegate = (id<AppDelegateProtocol>) [UIApplication sharedApplication].delegate; TodaysMeasurementObject* theDataObject; theDataObject = (TodaysMeasurementObject*) theDelegate.theAppDataObject; return theDataObject; } - (BOOL)shouldAutorotate { return NO; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } @end UPDATED - (void) measurementsSettingsUpdated:(NSNotification *) notification { NSMutableArray *viewControllers = [[NSMutableArray alloc] initWithArray: self.viewControllers]; UINavigationController *navigationController = [viewControllers objectAtIndex:0]; AddMeasurementViewController *addMeasurement = [[AddMeasurementViewController alloc] init]; [navigationController setViewControllers: [[NSArray alloc] initWithObjects:addMeasurement, nil]]; [viewControllers setObject:navigationController atIndexedSubscript:0]; self.viewControllers = viewControllers; } and removed the code from - tabBarController:didSelectViewController: but still the same error. I think the problem is that it's trying to get a value for the slide control after the view has been deleted. But some part of the view must still be alive...? Anyway to kill that off? Or leave it all alive??

    Read the article

  • wait_fences: failed to receive reply: 10004003 solution:not found.

    - by amy
    I am getting this error message,Whenever I show alertview in function : (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { and then handling the click actio in : -(void)alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)buttonIndex I saw all related posts but however didn't get any solution to this coz i dont have any keyboards on. I am only using navigation functions ans alertview inside it. App is also crash due to this problem. any help will highly appreciated.

    Read the article

  • Is dealloc method called in presentModalViewController when dismiss the controller.

    - by Madan Mohan
    Hi Guys, here the following code is used to view the present modal view controller. [[self navigationController] presentModalViewController:doctorListViewNavigationController animated:YES]; code for dismiss the ModalViewController. -(void)closeAction { [[self navigationController] dismissModalViewControllerAnimated:YES]; } My problem is the dealloc method is not called then I am getting memory issue problems like object allocations, leaks.. (void)dealloc { [doctorList release]; [myTableView release]; [super dealloc]; }

    Read the article

  • pushViewController causes memory leak

    - by hookjd
    The Leaks application tells me that the following function is causing a memory leak and I can't figure out why. -(void)viewGameList { GameListController *gameListViewController = [[GameListController alloc] initWithNibName:@"GameListController" bundle:nil]; gameListViewController.rootController = self; [self.navigationController pushViewController:gameListViewController animated:YES]; [gameListViewController release]; } It tells me that this line causes a 128 byte memory leak. [self.navigationController pushViewController:gameListViewController animated:YES]; Am I missing something obvious?

    Read the article

  • How can I change the animation style of a modal UIViewController?

    - by MrDatabase
    I'm currently displaying a UIViewController like this: [[self navigationController] presentModalViewController:modalViewController animated:YES]; and hiding it like this: [self.navigationController dismissModalViewControllerAnimated:YES]; The animation is "slide up from the bottom"... then slide back down. How can I change the animation style? Can I made it fade in/out? Cheers!

    Read the article

  • Pop to root SplitViewController in TabBarController - iOS

    - by Mike Bryant
    TableViewController Context: Here's my app: Tab 1: NavigationController -> ViewController Tab 2: SplitViewController -> Master : TableViewController -> SplitViewController ->TableViewController -> Detail : TableViewController -> TableViewController Tab 3: NavigationController -> ViewController (I'm Here) How do I pop to the root of each tab from a method in the tab 3 (basically a logout button)?

    Read the article

  • How to change pop view controller animation on back button ?

    - by Aryabhatt
    Hi all , I am pushing my view controller with the following statement : [[self navigationController] pushViewController:self.customViewController animatedWithTransition:UIViewAnimationTransitionFlipFromLeft]; Now when I am pressing the back button I want to animate it with the uiviewanimationtransitionflipfromright . like [self.navigationController popViewControllerAnimatedWithTransition:UIViewAnimationTransitionFlipFromLeft]; How Can I do so ? Thanks

    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

  • View doesn't respond to touches after shake

    - by Mike Rychev
    In my app I've implemented a shake event and it shows a UIImageView. When the UIImageView is shown, I hide the Nav Bar with: [self.navigationController setNavigationBarHidden:YES animated:NO]; And after that I want to bring it back when user touches the screen: - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { [[self navigationController] setNavigationBarHidden:NO animated:YES]; } But it doesn't work! Like my view doesn't respond to touches. Thanks in advance!

    Read the article

  • button item lost when hide and unhide toolbar

    - by RAGOpoR
    i dont know, why the button are disappear after the toolbar set to hide and unhide. how can i fix it? and i setup my button at this method -(void)viewDidAppear:(BOOL)animated this code use for hide toolbar [self.navigationController setNavigationBarHidden:YES animated:YES]; [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; [self.navigationController setToolbarHidden:YES animated:YES];

    Read the article

  • How can I present a modal view controller after selecting a contact?

    - by barfoon
    Hey everyone, I'm trying to present a modal view controller after selecting a contact and it doesnt seem to be working. In my - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person method, I dismiss peoplePicker, create an instance of my new view controller, then present it with [self.navigationController presentModalViewController:newController animated:YES]; and it doesnt work. However if i PUSH the view controller it works with this code: [self.navigationController pushViewController:newController animated:YES]; How can I accomplish this? Thank you,

    Read the article

  • Tracking Page views with the help of Flurry SDK?

    - by Shashank
    I have integrated mobile analytics in my iPhone app with the help of the Flurry analytics but I am not able to track page views. I have used the following code in my Application Delegate and passed an instance of UINavigationController in the place of navigationController [FlurryAPI logAllPageViews:navigationController]; But while checking the Page views in the Flurry website it is showing the message like this: You are not currently tracking Page View data. Is there something that I have to enable in the flurry website itself?

    Read the article

  • Multiple labels in Navigation bar

    - by cmos
    I would like to create a view similar to the "Now Playing" page on the iPhone and have 3 lines of text in the Navigation bar. The only way I could find to do this was: UINavigationBar *bar = [self.navigationController navigationBar]; label = [[UILabel alloc] initWithFrame:CGRectMake(60, 2, 200, 14)]; label.tag = SONG_TAG; label.backgroundColor = [UIColor clearColor]; label.font = [UIFont boldSystemFontOfSize:14]; label.adjustsFontSizeToFitWidth = NO; label.textAlignment = UITextAlignmentCenter; label.textColor = [UIColor whiteColor]; label.highlightedTextColor = [UIColor blackColor]; [bar addSubview:label]; [label release]; //Create album label label = [[UILabel alloc] initWithFrame:CGRectMake(60, 17, 200, 12)]; label.tag = ALBUM_TAG; label.backgroundColor = [UIColor clearColor]; label.font = [UIFont systemFontOfSize:12]; label.adjustsFontSizeToFitWidth = NO; label.textAlignment = UITextAlignmentCenter; label.highlightedTextColor = [UIColor blackColor]; label.textColor = HEXCOLOR(0xA5A5A5ff); [bar addSubview:label]; [label release]; //Create artist label label = [[UILabel alloc] initWithFrame:CGRectMake(60, 30, 200, 12)]; label.tag = ARTIST_TAG; label.backgroundColor = [UIColor clearColor]; label.font = [UIFont systemFontOfSize:12]; label.adjustsFontSizeToFitWidth = NO; label.textAlignment = UITextAlignmentCenter; label.highlightedTextColor = [UIColor blackColor]; label.textColor = HEXCOLOR(0xA5A5A5ff); [bar addSubview:label]; [label release]; The problem with this is I have to remove them when the view changes. So, in -viewWillDisappear I have: UILabel *label; label = (UILabel *)[self.navigationController.navigationBar viewWithTag:SONG_TAG]; [label removeFromSuperview]; label = (UILabel *)[self.navigationController.navigationBar viewWithTag:ALBUM_TAG]; [label removeFromSuperview]; label = (UILabel *)[self.navigationController.navigationBar viewWithTag:ARTIST_TAG]; [label removeFromSuperview]; I think the way to do this is make a custom view that has the 3 labels in it, and add this to the title view. (here's the catch - you can only add 1 label or view to the title view spot on the nav bar) self.navigationItem.titleView = newViewIMadeWithThreeLabels

    Read the article

  • How to save Application State using NSUserDefaults in iPhone?

    - by keith
    Hello Everyone, Following is what i am doing: - (void) applicationWillTerminate: (UIApplication*) application { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:navigationController.viewControllers forKey:@"diabetesstate"]; } - (void) applicationDidFinishLaunching: (UIApplication*) application { NSMutableArray *state = [[NSUserDefaults standardUserDefaults] objectForKey:@"diabetesstate"]; if (state == nil) { //Will initialize a new controller and put it as root view controller } else { [navigationController setViewControllers:state animated:NO]; } }

    Read the article

  • adding title to navigation bar

    - by praseed
    hi , i have two different view controllers added to the viewcontrollers array of a tabbarcontroller and this tabbarcontroller is added to a navigationcontroller. now i want to show different title for different views in the tabbar, on the navigationController. Pls help me to find a solution for this.... i am new to iPhone app development...

    Read the article

  • What is the proper way to change the UINavigationController transition effect

    - by Felipe Sabino
    I have seen lots of people asking on how to push/pop UINavigationControllers using other animations besides the default one, like flip or curl. The problem is that either the question/answer was relative old, which means the have some things like [UIView beginAnimations:] (example here) or they use two very different approaches. The first is to use UIView's transitionFromView:toView:duration:options:completion: selector before pushing the controller (with the animation flag set to NO), like the following: UIViewController *ctrl = [[UIViewController alloc] init]; [UIView transitionFromView:self.view toView:ctrl.view duration:1 options:UIViewAnimationOptionTransitionFlipFromTop completion:nil]; [self.navigationController pushViewController:ctrl animated:NO]; Another one is to use CoreAnimation explicitly with a CATransaction like the following: // remember you will have to have the QuartzCore framework added to your project for this approach and also add <QuartzCore/QuartzCore.h> to the class this code is used CATransition* transition = [CATransition animation]; transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]; transition.duration = 1.0f; transition.type = @"flip"; transition.subtype = @"fromTop"; [self.navigationController.view.layer removeAllAnimations]; [self.navigationController.view.layer addAnimation:transition forKey:kCATransition]; UIViewController *ctrl = [[UIViewController alloc] init]; [self.navigationController pushViewController:ctrl animated:NO]; There are pros and cons for both approaches. The first approach gives me a much cleaner code but restricts me from using animations like "suckEffect", "cube" and others. The second approach feels wrong just by looking at it. It starts by using undocumented transitions types (i.e. not present in the Common transition types documentation from CATransition Class Reference) which might get your app rejected from App Store (I mean might as I could not found any reference of apps being rejected because it was using this transactions, which I would also appreciate any clarification on this matter), but it gives you much more flexibility on your animations, as I can use other animation types such as "cameraIris", "rippleEffect" and so on. Regarding all that, do I really need to appeal for QuartzCore and CoreAnimation whenever I need a fancier UINavigationController transition? Is there any other way to accomplish the same effect using only UIKit? If not, will the use of string values like "flip" and "cube" instead of the pre-defined constants (kCATransitionFade, kCATransitionMoveIn, etc...) be an issue regarding my app approval in the App Store? Also, are there other pros and cons regarding both approaches that could help me deciding whether to choose each one of them?

    Read the article

  • Change TabBarController in detail view

    - by Antriel
    So I have a TabBarController with 2 views. One of the views is a TableView in navigationController. When user selects a row I push a detail view there. I want this detail view to have its own TabBarController different from the former one. So basically the question is if I can push a view on top different view with different TabBarController, but using navigationController not as a modal view.

    Read the article

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