Search Results

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

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

  • self.navigationController is nil after adding subview

    - by Nnp
    here is my productscontroller.h ProductListViewController *productListViewController; ProductGridViewController *productGridViewController; UIButton *flipIndicatorButton; and i am adding list and gridview as a subview like this in my implementation ProductListViewController *listController = [[ProductListViewController alloc] initWithNibName:@"ProductListView" bundle:nil]; self.productListViewController = listController; self.productListViewController.CurrentSale = CurrentSale; [self.view insertSubview:listController.view atIndex:0]; but in when i tried to push detailview controller from ProductListViewController.m like this ProductDetailViewController *productDetailViewController = [[ProductDetailViewController alloc] init]; productDetailViewController.productIndexPath = indexPath; [self.navigationController pushViewController:productDetailViewController animated:YES]; it just does not work, then i check [self.navigationController] , it was nil, now how to deal with this problem. i am ready to give some more code and detail to make more clear. thanks

    Read the article

  • viewDidAppear called when popping navigationController

    - by Tiago
    I'm having a bit of a problem with the viewDidAppear: method. I have a tabBarController with navigationControllers on each tab, and I have an action that requires that all the navigation controllers pop to their rootViewControllers (programmatically). The problem is that when they pop each navigation controller, the rootViewController's viewDidAppear get's called without it actually being shown. This causes them to do some stuff they were not supposed to (like showing alerts) unless they are actually shown. Besides having to check the currently selected tabBar item, is there any other way to solve this? Thanks.

    Read the article

  • referencing an instantiated object in another class in objective C

    - by Paul
    hi, I am working in xcode on an ipod app in objective C, and I have a field (navigationController) in one of my classes (rootViewController). How do I reference the instantiated rootViewController's navigationController from another class? For example, how would I do this if I want to reference the navigationController from the FirstViewController.m class? I seem to only be able to find references for this to reference the application delegate. If I want to reference the application delegate with FirstViewController, I just say: MyAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.navigationController pushViewController:childController animated:YES]; how do I do this for the rootViewController class instead of MyAppDelegate?

    Read the article

  • About hide toolbar in iphone app

    - by Jagie
    I have a navigationController which root viewController has no toolbar,but the root viewController navigates to a viewController which has a always visible toolbar.I must assure the root viewController's toolbar is hidden whether it is presented first or its above viewController is poped in the navigationController stack.So,I use the following code in the root viewController: - (void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [self.navigationController setToolbarHidden:YES animated:YES]; } is this the best sulotion?or I should use "hidesBottomBarWhenPushed" etc?

    Read the article

  • navigationController -- advertisement -- tableView in iPhone

    - by SeniorLee
    I've already implemented an app that has navigationController at the very top, and it shows tableView at the first, and if it's cell is clicked, another view is pushed into the navigationController. It's just an simple & normal app. But I want to put an ad between the navigationBar and the tableView. I've tried this and that. but it didn't work. Maybe there are several good ways to do it I believe. Hope somebody point me a good tutorial or throw me ideas. thanks.

    Read the article

  • How to add a TabBar to NavigationController based iPhone app

    - by Alex
    I have a simple NavigationController based app. The main window shows a TableView and selecting an item loads a sub-view. I used Interface Builder for UI views. Now I want to add a TabBar to the app. Where do I put it? Do I need a TabBarController? Should it go in the MainWindow.xib, or RootViewController.xib? How do I tie it together with my NavigationController?

    Read the article

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

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

    Read the article

  • How to hide parent tabbar when pushing controller in navigationController

    - by Yannis
    Hi all, I have an application with a tab bar controller and each view contains a navigation controller. My MainWindow looks as follows: Everything works fine as it is but I noticed a problem when pushing a details view to the navigation controller. In the didSelectRowAtIndexPath for a tableviewcontroller that belongs to the tab bar controller (the one called Latest in the image) I am doing this: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ArticleViewController *articleController = [[ArticleViewController alloc] initWithNibName:@"ArticleView" bundle:nil]; [self.navigationController pushViewController:articleController animated:YES]; [articleController release]; articleController = nil; } The ArticleViewController has its own tabbar because it needs to display different things. The problem is that when I push the ArticleViewController into the navigationController I see both tabbars at the bottom of the view. Is there any way I can solve this problem? Thanks in advance

    Read the article

  • Navigationcontroller, why isnt this working?

    - by f0rz
    Hi ! Why wont this work? View1 loads View2. In view2: - (void) goToView { View3 *plainText = [[Tabview_testViewController alloc] initWithNibName:@"View3" bundle:nil]; [self.navigationController pushViewController:plainText animated: NO]; [plainText release]; } - (void)viewDidLoad { [self goToView]; [super viewDidLoad]; } This will not trigger navigationController to pushView, but if I add a button and setAction (goToView) it works perfectly. What kind of problem do I missing here? Regards

    Read the article

  • How do I add a button to my navigationController's right side after pushing another view controller

    - by bobobobo
    So, immediately after pushing a view controller to my tableView, // Override to support row selection in the table view. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here -- // for example, create and push another view controller. AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; [self.navigationController pushViewController:anotherViewController animated:YES]; Ok, so that makes another view slide on, and you can go back to the previous view ("pop" the current view) by clicking the button that automatically appears in the top left corner of the navigation bar now. Ok, so SAY I want to populate the RIGHT SIDE of the navigation bar with a DONE button, like in the "Notes" app that comes with the iPhone. How would I do that? I tried code like this: UIBarButtonItem * doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector( doneFunc ) ]; self.navigationController.navigationItem.rightBarButtonItem = doneButton ; // not it.. [doneButton release] ; doneFunc is defined, and everything, just the button never appears on the right side..

    Read the article

  • TabBarController NavigationController with black backgroundbar

    - by Simon
    hello I've placed this code my didload method, to get a black Navigationbar. rootTabBarController.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; rootTabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; its working fine, but when the user rearranges the Icons in the editmode, i'm getting a default blue navigation bar. Can anyone help me to avid this ? btw: big thanks to the genius crowd!

    Read the article

  • TTThumbsViewController + navigationController issue

    - by michael
    Hi, .. 2 questions. I am only using Three20 for a gallery in my app. When I push my .. : TTThumbsViewController from another view, the navigation bar is not the color I want it to be (as per the rest of my app). I have set up a TTDefaultStyleSheet as per this stackoverflow QA. Is there something special I have to do as I am only using the TTThumbsViewController? The thumbs view is also created with extra space at the top, as though it is leaving room for a navigation controller, without knowing that one is already there. How can I tell the TTThumbsViewController to use the existing uinavigationcontroller? Or behave as though it is? MYThumbsViewController *mYThumbsViewController = [MYThumbsViewController alloc]; [self.navigationController pushViewController:mYThumbsViewController animated:YES]; The problem depicted graphically: Thanks!

    Read the article

  • BeginAnimations and CommitAnimations with NavigationController.PushViewController

    - by Chris S
    I'm trying to get a basic flip animation transition working when I push a controller inside a navigation. The code below flips the view, however the view appears first (each element fades in), and then the flip occurs. Is it possible to do a flip animation with a UINavigationController? Any pointers would be great, the examples I've found for Monotouch are performing animations on Views inside another view. void ToolbarButtonClick() { InformationController controller = new InformationController(); NavigationController.PushViewController(controller,true); } public class InformationController : UIViewController { public override void ViewDidLoad () { UIView.BeginAnimations("Flip"); UIView.SetAnimationDuration(1.0); UIView.SetAnimationTransition(UIViewAnimationTransition.FlipFromRight,View,true); base.ViewDidLoad (); Title = "Information"; } public override void ViewWillAppear (bool animated) { base.ViewWillAppear (animated); } public override void ViewDidAppear (bool animated) { base.ViewDidAppear (animated); UIView.CommitAnimations(); } }

    Read the article

  • UIScrollview doesnt resize in NavigationController when rotated

    - by Icky
    Hey, I have been dealing with this issue for 2 days now, not able to find a solution. I have a navigationcontroller as a root view controller. This one pushes a UIViewcontroller which in turn has a UIScrollview I created with IB. Additionally there is the Navigation bar. My problem arises, when I rotate the IPhone to Landscape mode. In -(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation I want my scrollview to take up the full width (480 px) which it doesnt. I am able to set the frame of the navigation bar to full width perfectly fine, but not the scrollview. I have read that this might be because of the autoresizing masks set in the rooviewcontroller but I have tried out a couple of solutions - none worked for me. Any ideas on how to challenge the problem? Dont know where to start looking.

    Read the article

  • NavigationController pushViewController problems.

    - by Jacek
    Hello. I have created new a view controller in my project (ActivateController). I have added it to the interface of the parent view controller (PrefsViewController): #import <UIKit/UIKit.h> #import "ActivateController.h" @interface PrefsViewController : UIViewController <UITextFieldDelegate> { ActivateController *activateController; } -(IBAction)pressedActivate; @property(nonatomic,retain) IBOutlet ActivateController *activateController; @end I have also added it to parent's controller nib (and changed it type to ActivateController), and connected it to IBOutlet ActivateController. But still, when I perform (on pressedActivate): [self.navigationController pushViewController:activateController animated:YES]; Nothing happens. I have done it successfully many times before. What might be wrong? P.S. pressedActivate is executed for sure (I used NSLog to check).

    Read the article

  • NavigationController does not set view properties correctly when pushed

    - by Sheehan Alam
    I have a UITabBarControllerDelegate that pushes a new view controller when a certain tab is pressed: - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { MyView* myView = [[[MyView alloc] initWithNibName:@"MyView" bundle:nil]autorelease]; if([self.tabBarController.selectedViewController.title isEqualToString:@"Friends"]){ NSLog(@"Clicked Friends"); myView.reloadFriends = TRUE; [self.navigationController myView animated:YES]; } } However, if I change my code to set the tabbar's selected view controller to myView everything works, but I don't get my navigation bar: if([self.tabBarController.selectedViewController.title isEqualToString:@"Friends"]){ NSLog(@"Clicked Friends"); myView.reloadFriends = TRUE; self.tabBarController.selectedViewController = myView; } How can I set the reloadFriends property in MyView and have the navigation bar at the top?

    Read the article

  • How to add UIview over a ViewController and its NavigationController

    - by Roxee Man
    I have a ViewController with a NavigationController and I want to add a translucent UIView with some Buttons over the ViewController when I press a ViewController button, the problem is that I can not put the UIView over the NavigationBar. How can I solve this? This is my code ( Very simple) -(void)setOpacityView { opacityVw = [[UIView alloc] initWithFrame:self.view.bounds]; opacityVw.backgroundColor = [[UIColor alloc] initWithRed:0.0 green:0.0 blue:0.0 alpha:0.8]; WPCustomButton *closeBtn = [[WPCustomButton alloc] initWithFrame:CGRectMake(230, 10, 80, 20)]; [closeBtn setTitle:@"Close X" forState:UIControlStateNormal]; [closeBtn setBackgroundColor:[UIColor clearColor]]; [closeBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [closeBtn addTarget:self action:@selector(closeView) forControlEvents:UIControlEventTouchUpInside]; [opacityVw addSubview:closeBtn]; } // --------------------------------------------------------------------------------------------------------------------- #pragma mark - Button methods -(void) closeView { [opacityVw removeFromSuperview]; } -(void)setProfileImage { [self setOpacityView]; [self.view addSubview:opacityVw]; }

    Read the article

  • Opening a View with a Table without a NavigationController

    - by Ken
    Hiya, I'm pretty new to developing with Cocoa Touch/XCode and I came across a problem. I'm making a sort of RSS reader for a newssite and I have 5 views of tables navigated with 5 tabs in a TabBarController. If someone selects a newsitem I want another view to open showing the complete newsitem. My problem is that it won't work. This is my code: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection(NSInteger)section{ return [[[self rssParser]rssItems]count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"rssItemCell"]; if(nil == cell){ cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"rssItemCell"]autorelease]; } cell.textLabel.text = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]title]; cell.detailTextLabel.text = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]description]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [[self appDelegate] setCurrentlySelectedBlogItem:[[[self rssParser]rssItems]objectAtIndex:indexPath.row]]; [self.appDelegate loadNewsDetails]; } And it calls this method in my delegate: -(void)loadNewsDetails{ [[self rootController]pushViewController:detailController animated:YES]; } Please tell me what I'm doing wrong. BTW I do not want to use a NavigationController, just the tabbar I'm using. Thanks in advance, Ken

    Read the article

  • iPhone app, navigationcontroller not functioning?

    - by dramaticlook
    I have 4 tabs in a tab bar. In one of the tabs i want to use a navigation, i.e. when i click an item from the list it should go to some details page about it. I have the list page where i have the navigation bar and the list of items. I can scroll them, but when I click any of them the selection animation happens, console logs the true row value, it even prints log instructions from constructor of the Details page but I can not see the Details page showing up. (btw Xcode 3.2.6 with iOS 4.3) - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSString *rowValue = [myStrings objectAtIndex:indexPath.row]; NSLog(rowValue); //[Utility setStr:rowValue]; [self.myTable deselectRowAtIndexPath:indexPath animated:TRUE]; //DETAILS PAGE HERE!!!! RestViewController * rest= [[RestViewController alloc] init]; rest.scoreLabel.text = rowValue; [self.navigationController pushViewController:rest animated:TRUE]; [rest release]; } Anybody having any idea? Thanks in advance!!!

    Read the article

  • IPhone SDK - Transition to NavigationController display problem

    - by Steblo
    Hi, I am nearly finished with my first IPhone app and everything works fine - except of one very little display bug: My starscreen is an UIView (Fullscreen) without Navigationbar or Toolbar. If I tap on a start button, there is an UIViewAnimationTransitionFlipFromRight animation that flips to the main navigation controller: -(IBAction) switchViewToMainMenu { [UIView beginAnimations:@"Flip View" context:nil]; [UIView setAnimationDuration:1.25]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight forView:self.window cache:YES]; [self.navController viewWillAppear:YES]; [self.startScreenViewController viewWillDisappear:YES]; [self.startScreenViewController.view removeFromSuperview]; [self.window addSubview:navController.view]; [self.startScreenViewController viewDidDisappear:YES]; [self.navController viewDidAppear:YES]; [UIView commitAnimations]; self.startScreenViewController=nil; [startScreenViewController release]; } This works fine except of one little problem: When the navigation controller view appears (flips in), the Navigationbar on top is some pixels too high (the is a white bar where the Navigationbar should be). When the animation finished, the Navigationbar drops down to the right position. This doesn't look very beautiful... Any ideas how to fix that problem ?

    Read the article

  • Best point to overwrite the navigationBar property of navigationController

    - by flohei
    Hi there, I'm overwriting UINavigationController to replace the default navigationBar property with an instance of my own subclass of UINavigationBar. So I tried something like _navigationBar = [[SBNavigationBar alloc] init]; in my -initWithRootViewController:. But that didn't work out as I expected it. There's still the default navigationBar being displayed. So what's the best point to overwrite the navigationBar? Thanks in advance –f

    Read the article

  • Pressing UIBarButtonItem on a NavigationController

    - by john
    Hey I've added a button the my navigation bar like so: UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStylePlain target:self action:@selector(methodtocall:)]; self.navigationItem.rightBarButtonItem = anotherButton; [anotherButton release]; However when I press this I get a InvalidArgumentException. This is in a brand new navigation project. Does anyone know why I get this behaviour?

    Read the article

  • UITableView only pushes to one controller

    - by Mitochondria
    So I have my UITableView, with 2 sections and 1 cell in each, and if I click the first one, it works, then the second one, it goes to the first controller. RootViewController is a navigationController, trying to push to ViewControllers. Here's the code for the tableView: // Customize the number of sections in the table view. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 2; } // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if(section == 0) return 1; else return 1; } - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{ if(section == 0){ return @"Terminal/SSH Guides"; }else{ return @"Cydia Tutorials"; } } // 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] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; } // Set up the cell... if(indexPath.section == 0){ cell.text = @"Changing Password for root"; } else { cell.text = @"Hiding Sections"; } return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { id newController; switch (indexPath.row) { case 0: newController = [[rootpassword alloc] initWithNibName:@"rootpassword" bundle:nil]; break; case 1: newController = [[hidingsections alloc] initWithNibName:@"hidingsections" bundle:nil]; break; default: break; } [self.navigationController pushViewController:newController animated:TRUE]; [tableView deselectRowAtIndexPath:indexPath animated:TRUE]; } I'm also having trouble adding more sections and rows/cells to sections. Thanks.

    Read the article

  • TabBar in NavigationController Based iphone app

    - by iPhoneDev
    I have a simple navigation based iPhone app, in which user can navigate form one view to another view. There is only one view which have 4 tab. Each tab loads a a seperate nib with a corresponding controller. Each nib contains a tableview with some other controls for searching/filtering etc. Apprt from this I dont need tabBar in any view. So for ex: Login View Welcome View (With TabBar) user select Setting tab and select any setting option Setting Detail view(WITHOUT tabbar) Back WelcomView( With Tab Bar) I am confused how to add a tab bar in navigation based template where only one view is using tabBar all other uses Navigation I hope you understand my problem. I am new to iphone so any example/link will help a lot. Thanks

    Read the article

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