Search Results

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

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

  • Leftover Nav Bar in Landscape View

    - by Rob Bonner
    Hello, I am working to force a view into landscape mode, and have picked up all kinds of cool tips to make this happen, but am stuck on one item that is left on the screen. I have my XIB file laid out in landscape, and in my code I create the view controller normally: RedeemViewController *aViewController = [[RedeemViewController alloc] initWithNibName:@"RedeemViewController" bundle:nil]; aViewController.hidesBottomBarWhenPushed = YES; aViewController.wantsFullScreenLayout = YES; [[self navigationController] pushViewController:aViewController animated:YES]; Inside the controller viewDidLoad I complete the following: [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight]; [[self navigationController] setNavigationBarHidden:YES animated:YES]; [UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimationDuration:.75]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; if (self.interfaceOrientation == UIInterfaceOrientationPortrait) { self.view.transform = CGAffineTransformIdentity; self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90)); self.view.bounds = CGRectMake(0.0, 0.0, 480, 320); } [UIView commitAnimations]; What I end up with is a perfectly rotated view, with a grey vertical bar on the left side (see pic). So to the question, how do I get rid of the bar? Edit: I am pretty sure this is the navigation bar that is not being hidden. This is a duplicate of another post, with some modified code, the other question was being answered with the bug.

    Read the article

  • Navigation Controller not Pushing/Popping View Controllers

    - by senfo
    I'm working on a view-based iPhone app that has the following flow: search - (list | map) - details To accomplish the transitions between views, I have a UINavigationController, with the search view controller being the root. After a user performs a search, I transition to a view with a segmented control, which acts as a tab to switch between the list and map functionality (per a suggestion from a related question I had). This view contains a UIViewController, which allows me to switch between the list/map view when a user taps the segmented control. I'm fine up until this point. As you can see from the above mentioned flow, I would like to provide the ability to transition into a details view. Each row of my table in the list view contains a details disclosure button for allowing the user to drill down into a details view. The problem is, when I try to push the details view onto the navigation stack, nothing happens. Below is the delegate method (from my list view controller) to handle the details disclosure button being tapped. I've set up break points, so I know the code is running. The navigation controller simply doesn't want to push the detailsController onto the stack (my guess is that I don't have a pointer to the correct UINavigationController). - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath { if (detailController == nil) { detailController = [[DetailsViewController alloc] init]; } [self.navigationController pushViewController:detailController animated:YES]; } Assuming I was probably missing a pointer to the navigation controller, I exposed a UINavigation property on my list and map views (navigationController is readonly) and initialized them with a pointer to the navigation controller from my SwitchViewController (the view responsible for switching between list/map views when a user changes the value of the segmented control). Unfortunately, this did not solve the problem. Am I on the right track? If so, how do I see to it that my view has a pointer to the correct navigation controller? Should I add a delegate, which allows me to call a function in the SwitchViewController that transitions into the details view (this seems messy)?

    Read the article

  • How do I pass an NSString through 3 ViewControllers?

    - by dBloc
    hey, I'm currently using the iPhone SDK and I'm having trouble passing an NSString through 3 views I am able to pass an NSString between 2 view controllers but I am unable to pass it through another one. My code is as follows... `- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)index`Path { NSString *string1 = nil; NSDictionary *dictionary = [listOfItems objectAtIndex:indexPath.section]; NSArray *array = [dictionary objectForKey:@"items"]; string1 = [array objectAtIndex:indexPath.row]; //Initialize the detail view controller and display it. ViewController2 *vc2 = [[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:[NSBundle mainBundle]]; vc2.string1 = string1; [self.navigationController pushViewController:vc2 animated:YES]; [vc2 release]; vc2 = nil; } in the "ViewController 2" implementations I am able use "string1" in the title bar by doing the following.... - (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.title = string1; UIBarButtonItem *addButton = [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon_time.png"] style:UIBarButtonItemStylePlain //style:UIBarButtonItemStyleBordered target:self action:@selector(goToThirdView)] autorelease]; self.navigationItem.rightBarButtonItem = addButton; } but I also have a NavBar Button on the right side that I would like to push a new view - (void)goToThirdView { ViewController3 *vc3 = [[ViewController3 alloc] initWithNibName:@"ViewController3" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:NESW animated:YES]; vc3.string1 = string1 ; [vc3 release]; vc3 = nil; } How do I pass on that same string to the third view? (or fourth)

    Read the article

  • iPhone -trouble with a loading data from webservice into a tableview

    - by medampudi
    I am using a Window based application and then loading up my initial navigationview based controller. After loading it if the user is not registered/ does not have a credentials present then it takes the user to a login view controller . loginViewController *sampleView = [[loginViewController alloc] initWithNibName:@"loginViewController" bundle:nil]; [self.navigationController presentModalViewController:sampleView animated:YES]; [sampleView release]; then right after that i try to load the table with data that i get from a webservice using asiHTTP .. for this question lets say it takes 3 seconds time to get the data and then deserialize it . now... my question is it works out okey in the later runs as I store the username and password in a seure location... but in the first instance.... i am not able to get the data to laod to the tableview... I have tried a lot of things... 1. Initially the data fetch methods was in a diffrent methods.. so i thought that might be the problem as then moved it the same place as the tbleviewController(navigationController) 2. I event put in the Reload data at the end of the functionality for the data parsing and deserialization... nothing happens. 3. i did not understand the concept of @property and alll.... 4. The screen is black screen with nothing displayed on it for a good 5 seconds in the consecutive launches of the app.... so could we have something like a MBPorgressHUD implemented for the same. could any one please help for these scenarios and guidance as to what paths to take from here...

    Read the article

  • Loading a UIView from a UITableview

    - by Michael Robinson
    I can firgure out how to push a UIView from a Tableview and have the "child" details appear. Here is the view I'm trying to load: Here is the code that checks for children and either pushes a itemDetail.xib or an additional UITable, I want to use the above .xib but load the correct contents "tableDataSource" into the UItable: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //Get the dictionary of the selected data source. NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row]; //Get the children of the present item. NSArray *Children = [dictionary objectForKey:@"Children"]; if([Children count] == 0) { ItemDetailViewController *dvController = [[ItemDetailViewController alloc] initWithNibName:@"ItemDetailView" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:dvController animated:YES]; [dvController release]; } else { //Prepare to tableview. FirstTab *rvController = [[FirstTab alloc] initWithNibName:@"FirstView" bundle:[NSBundle mainBundle]]; //Increment the Current View rvController.CurrentLevel += 1; //Set the title; rvController.CurrentTitle = [dictionary objectForKey:@"Title"]; //Push the new table view on the stack [self.navigationController pushViewController:rvController animated:YES]; rvController.tableDataSource = Children; [rvController release]; } } Thanks for the help. I see lots of stuff on this but can't find the correct push instructions.

    Read the article

  • Why isn't my leak detected by Xcode Intrumensts?

    - by Arlaharen
    I am trying to analyze some code of mine, looking for memory leaks. My problem is that some of my objects are leaking (at least as far as I can see), but the Leaks tool doesn't detect the leaks. My guess is that some iPhone OS object still holds pointers to my leaked objects. The objects I am talking about are subclasses of UIViewController that I use like this: MyController *controller = [[MyController alloc] initWithNibName:@"MyController" bundle:nil]; [self.navigationController pushViewController:controller animated:YES]; When these objects are no longer needed I do: [self.navigationController popViewControllerAnimated:YES]; Without a [controller release] call right now. Now when I look at what objects that gets created I see a lot of MyController instances that never gets destroyed. To me these are memory leaks, but to the Leaks tool they are not. Can someone here tell me if there is some way Instruments can tell me what objects are pointing to my MyController instances and thereby making them not count as memory leaks? Or better yet, tell me why these leaks are not detecetd.

    Read the article

  • UIImageView not displaying image when property is set too early

    - by Undeadlegion
    I have an image I want to display inside a UIView. In Interface Builder, the UIView is the root and a UIImageView is its child. The view is connected to view controller's view outlet, and the image view is connected to the image view outlet: @property (nonatomic, retain) IBOutlet UIImageView *imageView; If I try to set the image property of UIImageView before it's visible, the image doesn't show up. TestView *testView = [[TestView alloc] initWithNibName:@"TestView" bundle:nil]; testview.imageView.image = [logos objectAtIndex:indexPath.row]; [self.navigationController pushViewController:testView animated:YES]; If, however, I pass the image to the controller and set the image property in view did load, the image becomes visible. TestView *testView = [[TestView alloc] initWithNibName:@"TestView" bundle:nil]; testview.image = [logos objectAtIndex:indexPath.row]; [self.navigationController pushViewController:testView animated:YES]; - (void)viewDidLoad { [super viewDidLoad]; imageView.image = image; } What is causing the image to not show up in the first scenario?

    Read the article

  • Thread 1: Program received signal:"Sigbart"

    - by user813678
    When i try to run my app on my iPhone, I get " Thread 1: Program received signal:"Sigbart" xCode say that points to [self.navigationController pushViewController:detailViewController animated:YES]; import "RootViewController.h" import "global.h" import "golfbaner.h" @implementation RootViewController @synthesize banenavn; (void)viewDidLoad { [super viewDidLoad]; NSArray *temp = [[NSArray alloc] initWithObjects: @"Alsten Golfklubb", @"Arendal og Omegn Golfklubb", @"Asker Golfklubb", @"Askim Golfklubb", @"Atlungstad Golfklubb", @"Aurskog Golfpark", @"Ballerud Golfklubb", @"Bamble Golfklubb", @"Bergen Golfklubb", @"Bjorli Golfklubb", @"Bjørnefjorden Golfklubb", @"Bjaavann Golfklubb", @"Bodø Golfbane", @"Borre Golfbane", @"Borregaard Golfklubb", @"Brønnøysund Golfklubb", @"Byneset Golfklubb", @"Bærum Golfklubb", @"Drammen Golfklubb", @"Drøbak Golfklubb", @"Egersund Golfklubb", @"Eidskog Golfklubb", @"Eiker Golfklubb", @"Ekholt Golfklubb", @"Elverum Golfklubb", @"Fana Golfklubb", @"Fet Golfklubb", @"Frosta Golfklubb", @"Geilo Golfklubb", @"Giske Golfklubb", @"Gjerdrum Golfpark", @"Gjersjøen Golfklubb", @"Gjøvik og Toten Golfklubb", @"Gran Golfklubb", @"Grenland Golfklubb", @"Grimstad Golfklubb", @"Grini Golfklubb", @"Groruddalen Golfklubb", @"Grønmo Golfklubb", @"Hafjell Golfklubb", @"Haga Golfpark", @"Hakadal Golfklubb", @"Halden Golfklubb", @"Hallingdal Golfklubb", @"Hammerfest og Kvalsund Golfklubb", @"Hardanger Golfklubb", @"Harstad Golfklubb", @"Haugaland Golfklubb", @"Hauger Golf", @"Haugesund Golfklubb", @"Helgeland Golfklubb", @"Hemsedal Golfklubb", @"Herdla Golfklubb", @"Hitra Golfklubb", @"Hof Golfklubb", @"Holtsmark Golfklubb", @"Hovden Golfklubb", @"Hurum Golfklubb", @"Huseby og Hankø Golfklubb", @"Hvaler Golfklubb", @"Hvam Golfklubb", @"Jæren Golfklubb", @"Karasjok Golfklubb", @"Karmøy Golfklubb", @"Kjekstad Golfklubb", @"Klæbu Golfklubb", @"Kongsberg Golfklubb", @"Kongsvinger Golfklubb", @"Kragerø Golfklubb", @"Kristiansand Golfklubb", @"Kristiansund og Omegn Golfklubb", @"Krokhol Golfklubb", @"Kvinesdal og Omegn Golfklubb", @"Kvinnherad Golfklubb", @"Kvitfjell", @"Larvik Golfklubb", @"Lillehammer Golf Park", @"Lillestrøm Golfklubb", @"Lofoten Golf Links", @"Lommedalen Golfklubb", @"Losby Golfklubb", @"Lærdal Golfklubb", @"Lønne Golfklubb", @"Mandal Golfklubb", @"Meland Golfklubb", @"Midt-Troms Golfklubb", @"Miklagard Golfklubb", @"Mjøsen Golfklubb", @"Moa Golfklubb", @"Modum Golfklubb", @"Molde Golfklubb", @"Moss og Rygge Golfklubb", @"Mørk Golfklubb", @"Namdal Golfklubb", @"Namsos Golfklubb", @"Narvik Golfklubb", @"Nes Golfklubb", @"Nittedal Golfklubb", @"Nordfjord Golfklubb", @"Nordvegen Golfklubb", @"Norefjell Golfklubb", @"Norsjø og Omegn Golfklubb", @"North Cape Golf Club", @"Nærøysund Golfklubb", @"Nøtterøy Golfklubb", @"Odda Golfklubb", @"Ogna Golfklubb", @"Onsøy Golfklubb", @"Oppdal Golfklubb", @"Oppegård Golfklubb", @"Oslo Golfklubb", @"Oustøen Country Club", @"Polarsirkelen Golf", @"Preikestolen Golfklubb", @"Randaberg Golfklubb", @"Randsfjorden Golfklubb", @"Rauma Golfklubb", @"Re Golfklubb", @"Ringerike Golfklubb", @"Rygge Flystasjon Golf Club", @"Røros Golfklubb", @"Salten Golfklubb", @"Sandane Golfklubb", @"Sande Golfklubb", @"Sandefjord Golfklubb", @"Sandnes Golfklubb", @"Sauda Golfklubb", @"Selbu Golfklubb", @"Selje Golfklubb", @"Setesdal Golfklubb", @"Skei Golfklubb", @"Ski Golfklubb", @"Skjeberg Golfklubb", @"Smøla Golfklubb", @"Sola Golfklubb", @"Solastranden Golfklubb", @"Solum Golfklubb", @"Soon Golfklubb", @"Sorknes Golfklubb", @"Sotra Golfklubb", @"Stavanger Golfklubb", @"Steinkjer Golfklubb", @"Stiklestad Golfklubb", @"Stjørdal Golfklubb", @"Stord Golfklubb", @"Stranda Golfklubb", @"Stryn Golfklubb", @"Sunndal Golfklubb", @"Sunnfjord Golfklubb", @"Sunnmøre Golfklubb", @"Surnadal Golfklubb", @"Tjøme Golfklubb", @"Tromsø Golfklubb", @"Trondheim Golfklubb", @"Trysil Golfklubb", @"Tyrifjord Golfklubb", @"Ullensaker Golfklubb", @"Valdres Golfklubb", @"Vanylven Golfklubb", @"Varanger Golfklubb", @"Vesterålen Golfklubb", @"Vestfold Golfklubb", @"Vildmarken Golfklubb", @"Volda Golfklubb", @"Voss Golfklubb", @"Vrådal Golfklubb", @"Østmarka Golfklubb", @"Øya Golfpark", @"Ålesund Golfklubb", nil]; self.banenavn = temp; [temp release]; self.title = @"Golfbaner i Norge"; self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; } (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; } (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; } (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; } (void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; } /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations. return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ // Customize the number of sections in the table view. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [banenavn count]; } // 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]; } cell.textLabel.text = [banenavn objectAtIndex:indexPath.row]; return cell; } /* // 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:UITableViewRowAnimationFade]; } 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; } */ (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { golf = [banenavn objectAtIndex:indexPath.row]; golfbaner *detailViewController = [[golfbaner alloc] initWithNibName:@"Golfbaner" bundle:nil]; [self.navigationController pushViewController:detailViewController animated:YES]; [detailViewController release]; } (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Relinquish ownership any cached data, images, etc that aren't in use. } (void)viewDidUnload { [super viewDidUnload]; // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. // For example: self.myOutlet = nil; } (void)dealloc { [super dealloc]; } @end

    Read the article

  • Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <CALayerArray: 0x66522e0> was mutated while being enumerated

    - by fahu
    some times my app crashed by showing * Collection was mutated while being enumerated . This is occurring in same line of code all the time.please help me on this issue. i stuck on this. the app is crashing at pushing view controller line of my code.but it is not frequent one. my error console Terminating app due to uncaught exception 'NSGenericException', reason: '* Collection CALayerArray: 0x1030c730 was mutated while being enumerated. "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" )' my code: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ServiceDetails *service=[[ServiceDetails alloc] initWithNibName:@"ServiceDetails" bundle:nil]; CompanyListingForm *list=[[CompanyListingForm alloc]initWithNibName:@"CompanyListingForm" bundle:nil]; [category_company_text resignFirstResponder]; if(viewHoldingTable) { [viewHoldingTable removeFromSuperview]; } if (category_clicked_flag==0) { if (location_or_cat_com==0) { NSMutableArray *get=[district_array objectAtIndex:indexPath.row]; locationid=[[get objectAtIndex:0]intValue]; [location_textfield resignFirstResponder]; location_textfield.text=[get objectAtIndex:1]; } else { if (draggingView) { [draggingView removeFromSuperview]; } if (viewHoldingTable) { [viewHoldingTable removeFromSuperview]; } NSMutableArray *get=[company_array objectAtIndex:indexPath.row]; category_company_text.text=[get objectAtIndex:1]; service.ida=[NSString stringWithFormat:@"%d",[[get objectAtIndex:0] intValue]]; service.idloc=[NSString stringWithFormat:@"%d",locationid]; [self.navigationController pushViewController:service animated:YES];//getting error at this point. //[emer release]; } } else { if (location_or_cat_com==0) { NSMutableArray *get=[district_array objectAtIndex:indexPath.row]; locationid=[[get objectAtIndex:0]intValue]; [location_textfield resignFirstResponder]; location_textfield.text=[get objectAtIndex:1]; } else { NSMutableArray *get=[category_array objectAtIndex:indexPath.row]; category_company_text.text=[get objectAtIndex:1]; int catid=[[get objectAtIndex:0]intValue]; list.IDForLoc=[NSString stringWithFormat:@"%d",locationid]; list.IDForCat=[NSString stringWithFormat:@"%d",catid]; list.companydetails=[get objectAtIndex:1]; [self.navigationController pushViewController:list animated:YES];//getting error at this point. } } [service release]; [list release]; }

    Read the article

  • Pinch gesture in QLPreviewController?

    - by Arne
    I am using the QLPreviewController in my project, but cannot use pinch gestures to zoom in. What do I need to set up first? This is how I create the view controller: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { QLPreviewController *previewer = [[QLPreviewController alloc] init]; [previewer setDataSource:self]; [previewer setCurrentPreviewItemIndex:indexPath.row]; [[self navigationController] pushViewController:previewer animated:YES]; }

    Read the article

  • UIViewController not loading a UIView

    - by Cosizzle
    Hey, I'm playing around with a script my teacher provided for a table based application. However I can't seem to get my own view to load. Files: SubViewOneController (which is a sub view, also has a nib) TapViewController (Custom UIView I created and want to add to a cell) RootViewController (Main controller which loads in the views) SimpleNavAppDelegate How it works: Within the RootViewController, there's an NSArray that holds NSDictionary objects which is declared in the -(void)awakeFromNib {} method - (void)awakeFromNib { // we'll keep track of our views controllers in this array views = [[NSMutableArray alloc] init]; // when using alloc you are responsible for it, and you will have to release it. // ==================================================================================================== // ==================================================================================================== // LOADING IN CUSTOM VIEW HERE: // allocate a set of views and add to our view array as a dictionary item TapViewController *tapBoardView = [[TapViewController alloc] init]; //push onto array [views addObject:[NSDictionary dictionaryWithObjectsAndKeys: @"Tab Gestures", @"title", tapBoardView, @"controller", nil]]; [tapBoardView release]; //release the memory // ==================================================================================================== // ==================================================================================================== SubViewOneController *subViewOneController = [[SubViewOneController alloc] init]; // This will set the 2nd level title subViewOneController.title = @"Swipe Gestures"; //set it's title //push it onto the array [views addObject:[NSDictionary dictionaryWithObjectsAndKeys: @"Swipe Gestures", @"title", subViewOneController, @"controller", nil]]; [subViewOneController release]; //release the memory } Later on I set the table view: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // OUTPUT -- see console NSLog(@"indexPath %i", indexPath.row); // OUTPUT: tapController: <TapViewController: 0x3b2b360> NSLog(@"view object: %@", [views objectAtIndex:indexPath.row]); // OUTPUT: view object: controller = <TapViewController: 0x3b0e290>; title = "Tab Gestures"; // ----- Hardcoding the controller and nib file in does work, so it's not a linkage issue ------ // UNCOMMENT TO SEE WORKING -- comment below section. //TapViewController *tapContoller = [[TapViewController alloc] initWithNibName:@"TapBoardView" bundle:nil]; //NSLog(@"tapController: %@", tapContoller); //[self.navigationController pushViewController:tapContoller animated:YES]; // ----- Random Tests ----- //UIViewController *targetViewController = [[views objectAtIndex: 0] objectForKey:@"controller"]; // DOES NOT WORK // LOADS THE SECOND CELL (SubViewOneController) however will not load (TapViewController) UIViewController *targetViewController = [[views objectAtIndex: indexPath.row] objectForKey:@"controller"]; NSLog(@"target: %@", targetViewController); // OUTPUT: target: <TapViewController: 0x3b0e290> [self.navigationController pushViewController:targetViewController animated:YES]; } Reading the comments you should be able to see that hardcoding the view in, works - however trying to load it from the View NSArray does not work. It does however contain the object in memory, seeing that NSLog proves that. Everything is linked up and working within the TapViewController nib file. So ya, im kinda stuck on this one, any help would be great! Thanks guys

    Read the article

  • willAnimateRotationToInterfaceOrientation not firing iphone UIInterfaceOrientation

    - by harekam_taj
    Hello, I have a view inside a tabbarcontroller and navigationcontroller and my willAnimateRotationToInterfaceOrientation method is not firing. I have set the view to be FirstResponder and also shouldAutorotateToInterfaceOrientation returning YES; - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { return YES; } -(BOOL)canBecomeFirstResponder { return YES; } [self becomeFirstResponder];

    Read the article

  • Is that possible using "setAutoresizingMask" to make the view autoresizing after hiding/showing navi

    - by Mickey Shine
    I am doing this with the following: [[self navigationController] setNavigationBarHidden:YES animated:YES]; and also I didn't use IB to create view objects. But my view did not auto-resize after hiding navigation bar(there was a blank area where the navigation bar used to be) I am wondering if I could make it auto-resize only by "setAutoresizingMask", or do I have to use some hand-writing animation stuff?

    Read the article

  • iPhone app with tab bar and navigation bar as peers

    - by Mac
    I'm trying to write an application that uses a navigation bar and tab bar in what (I'm gathering) is an unusual manner. Basically, I've got several "pages" ("home", "settings", etc) that each have their own tab. I'd also like to have it so that the "home" page is the root view of the navigation bar, and the other pages are the second-level views of the navigation bar. That is, I should be able to navigate to any page by clicking the appropriate tab bar item, and should be able to navigate to the home page from any other page by clicking the navigation bar's back button. Currently, I have a UINavigationBar (through a UINavigationController) and a UITabBar (through a UITabController) as children of a UIView. The various pages' view controllers are set as the tab controller's viewControllers property, and the home page's controller is also set as the navigation controller's root view. Each page view's tag is set to its index in the tab control. I have the following logic in the tab controller's didSelectViewController delegate method: - (void) tabBarController:(UITabBarController*) tabBarController didSelectViewController:(UIViewController*) viewController { if ([navController.viewControllers count] > 1) [navController popViewControllerAnimated:NO]; [navController pushViewController:viewController animated:YES]; } Also, in the navigation controller's didShowViewController delegate method, I have the following code: - (void) navigationController:(UINavigationController *) navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated { tabController.selectedIndex = viewController.view.tag; } The problem that's occurring is that when I run this, the navigation bar, tab bar and home page all display ok, but the tab bar will not respond to input - I cannot select a different tab. I gather it's more usual to have the tab bar as the child of the navigation control, or vice versa. This doesn't seem to fit my approach, because I don't want to have to individually create the subordinate control each time a change occurs in the parent control - eg: recreate tab bar each time the navigation bar changes. Does anyone have suggestions as to what's wrong and how to fix it? I'm probably missing something obvious, but whatever it is I can't seem to find it. Thanks! EDIT: I'm guessing it has something to do with both controller's trying to have ownership of the page controller, but I can't for the life of me figure out a way around it.

    Read the article

  • How to set title in the MFMailComposerViewController ?

    - by Biranchi
    Hi All, I am trying to set the title of MFMailComposerViewController , which is a subclass of UINavigationController. I am using these following ways : MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; [picker.navigationController navigationItem].title = @"Send Mail"; [[picker navigationItem] setTitle:@"Send Mail"]; But I am not able to set the Title. Am i doing it wrong ?? Is there any other method to do so ?? Thanks

    Read the article

  • how to balance position of UIBarButtonItem in toolbar

    - by RAGOpoR
    is it possible to balance the position of button(example toolbar in Safari)? UIBarButtonItem *infoButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(support:)]; UIBarButtonItem *next = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPlay target:self action:@selector(support:)]; [self.navigationController.toolbar setItems:[NSArray arrayWithObjects:infoButton, next,nil] animated:YES];

    Read the article

  • Unbalanced calls to begin/end appearance transitions for <ViewController>,<Tab>

    - by onkar
    I am trying to implement Tabs into my secondView.On button touch(from ViewController.m) I am navigating to secondView(Tabs). In my Tabs.xib file I have added a TabBar at bottom and it is custom class of UITabBar. ViewController.m - (IBAction)touchedInside:(id)sender { NSLog(@"touhced up inside"); Tabs *temp = [[Tabs alloc]initWithNibName:@"Tabs" bundle:nil]; [self.navigationController pushViewController:temp animated:YES]; [self presentViewController:temp animated:YES completion:nil]; } Tabs.m - (void)viewDidLoad { [super viewDidLoad]; AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; UITabBarController *tabBarController = [[UITabBarController alloc]init]; /* Tab_1 *firstView = [[Tab_1 alloc] init]; UITabBarItem *item1 = [[UITabBarItem alloc]initWithTitle:@"First" image:nil tag:1]; [firstView setTabBarItem:item1]; NSLog(@"after first tab is added"); Tab_2 *secondView = [[Tab_2 alloc] init]; UITabBarItem *item2 = [[UITabBarItem alloc]initWithTitle:@"Sec" image:nil tag:1] ; [secondView setTabBarItem:item2]; NSLog(@"after second tab is added"); [tabBarController setViewControllers:[NSArray arrayWithObjects:firstView,secondView,nil] animated:NO]; NSLog(@"after tab is added"); [appDelegate.window addSubview:tabBarController.view]; NSLog(@"after view is added"); */ appDelegate.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. UIViewController *viewController1 = [[Tab_1 alloc] initWithNibName:@"Tab 1" bundle:nil]; UIViewController *viewController2 = [[Tab_2 alloc] initWithNibName:@"Tab 2" bundle:nil]; UIViewController *viewController3 = [[Tab_2 alloc] initWithNibName:@"Tab 1" bundle:nil]; tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, viewController3, nil]; appDelegate.window.rootViewController = self.tabBarController; [appDelegate.window makeKeyAndVisible]; Tabs *temp = [[Tabs alloc]initWithNibName:@"Tabs" bundle:nil]; [self.navigationController presentModalViewController:temp animated:NO]; } Errors Unbalanced calls to begin/end appearance transitions for <ViewController: 0x6833c80>. 2012-12-06 09:57:48.963 demoTabs[667:f803] Unbalanced calls to begin/end appearance transitions for <Tabs: 0x6a3fc90>.

    Read the article

  • Custom UINavigationBar Background

    - by tigermain
    I've been trying to set up a custom background for the whole of my NavigationBar (not just the titleView) but have been struggling. I found this thread http://discussions.apple.com/thread.jspa?threadID=1649012&tstart=0 But am not sure how to implement the code snippet that is given. Is the code implemented as a new class? Also where do I instatiate the NavigationController as I have an application built with the NavigationView template so it is not done in my root controller as per the example

    Read the article

  • tabBarController popToRooTViewControler

    - by Jacob
    Every time a user changes a tab, for the selected tab I want to push it to its top level controller. I have implemented the delegate method for the Tabbarcontroller like this: - (void) tabBarControler:(UITabBarController )tabBarController didSelectViewController:(UIViewController)viewController{ [[self navigationController] popToRootViewController Animated:NO]; } This does nto seem to work but I can confirm the method is being called every time I change tabs

    Read the article

  • My App crashes when launched on my Iphone

    - by Miky Mike
    hi guys, I have a problem here : my app crashed on my Iphone (JB) though Xcode doesn't complain about anything. The app works fine on the simulator though. However, there is this in the device logs : Thread 0 Crashed: 0 libSystem.B.dylib 0x00078ac8 kill + 8 1 libSystem.B.dylib 0x00078ab8 kill + 4 2 libSystem.B.dylib 0x00078aaa raise + 10 3 libSystem.B.dylib 0x0008d03a abort + 50 4 libstdc++.6.dylib 0x00044a20 __gnu_cxx::__verbose_terminate_handler() + 376 5 libobjc.A.dylib 0x00005958 _objc_terminate + 104 6 libstdc++.6.dylib 0x00042df2 _cxxabiv1::_terminate(void (*)()) + 46 7 libstdc++.6.dylib 0x00042e46 std::terminate() + 10 8 libstdc++.6.dylib 0x00042f16 __cxa_throw + 78 9 libobjc.A.dylib 0x00004838 objc_exception_throw + 64 10 CoreFoundation 0x0009fd0e +[NSException raise:format:arguments:] + 62 11 CoreFoundation 0x0009fd48 +[NSException raise:format:] + 28 12 Foundation 0x000125d8 -[NSURL(NSURL) initFileURLWithPath:] + 64 13 Foundation 0x000371e0 +[NSURL(NSURL) fileURLWithPath:] + 24 14 TheLearningMachine 0x00002d08 0x1000 + 7432 15 TheLearningMachine 0x00002e8c 0x1000 + 7820 16 TheLearningMachine 0x00002be4 0x1000 + 7140 17 TheLearningMachine 0x000029b6 0x1000 + 6582 18 UIKit 0x0000e47a -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 766 19 UIKit 0x000049e0 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 200 20 UIKit 0x0005dfd6 -[UIApplication handleEvent:withNewEvent:] + 1390 21 UIKit 0x0005d8fa -[UIApplication sendEvent:] + 38 22 UIKit 0x0005d330 _UIApplicationHandleEvent + 5104 23 GraphicsServices 0x00005044 PurpleEventCallback + 660 24 CoreFoundation 0x00034cdc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 20 25 CoreFoundation 0x00034ca0 __CFRunLoopDoSource1 + 160 26 CoreFoundation 0x00027566 __CFRunLoopRun + 514 27 CoreFoundation 0x00027270 CFRunLoopRunSpecific + 224 28 CoreFoundation 0x00027178 CFRunLoopRunInMode + 52 29 UIKit 0x000040fc -[UIApplication _run] + 364 30 UIKit 0x00002128 UIApplicationMain + 664 31 TheLearningMachine 0x00002948 0x1000 + 6472 32 TheLearningMachine 0x000028fc 0x1000 + 6396 Thread 1: 0 libSystem.B.dylib 0x0002d330 kevent + 24 1 libSystem.B.dylib 0x000d6b6c _dispatch_mgr_invoke + 88 2 libSystem.B.dylib 0x000d65bc _dispatch_queue_invoke + 96 3 libSystem.B.dylib 0x000d675c _dispatch_worker_thread2 + 120 4 libSystem.B.dylib 0x0007a67a _pthread_wqthread + 258 5 libSystem.B.dylib 0x00073190 start_wqthread + 0 Thread 2: 0 libSystem.B.dylib 0x0007b19c __workq_kernreturn + 8 1 libSystem.B.dylib 0x0007a790 _pthread_wqthread + 536 2 libSystem.B.dylib 0x00073190 start_wqthread + 0 Thread 3: 0 libSystem.B.dylib 0x00000c98 mach_msg_trap + 20 1 libSystem.B.dylib 0x00002d64 mach_msg + 44 2 CoreFoundation 0x00027c38 __CFRunLoopServiceMachPort + 88 3 CoreFoundation 0x000274c2 __CFRunLoopRun + 350 4 CoreFoundation 0x00027270 CFRunLoopRunSpecific + 224 5 CoreFoundation 0x00027178 CFRunLoopRunInMode + 52 6 WebCore 0x000024e2 RunWebThread(void*) + 362 7 libSystem.B.dylib 0x0007a27e _pthread_start + 242 8 libSystem.B.dylib 0x0006f2a8 thread_start + 0 Thread 0 crashed with ARM Thread State: r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x3e0862b4 r4: 0x00000006 r5: 0x0015a2ec r6: 0x2fffe090 r7: 0x2fffe0a0 r8: 0x3e1a378c r9: 0x00000065 r10: 0x33028e5a r11: 0x3e1ab89c ip: 0x00000025 sp: 0x2fffe0a0 lr: 0x30277abf pc: 0x30277ac8 cpsr: 0x000f0010 Any idea what the problem can be ? I've already spent my whole day on that, but... I'm stuck. Thanks in advance... Miky Mike Ok, Here is more then from the console, I get this : This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys002 Loading program into debugger… Program loaded. target remote-mobile /tmp/.XcodeGDBRemote-17280-65 Switching to remote-macosx protocol mem 0x1000 0x3fffffff cache mem 0x40000000 0xffffffff none mem 0x00000000 0x0fff none run Running… Error launching remote program: failed to get the task for process 456. Error launching remote program: failed to get the task for process 456. The program being debugged is not being run. The program being debugged is not being run. [Session started at 2010-12-23 20:33:33 +0100.] GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Thu Aug 5 05:54:10 UTC 2010) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys004 Loading program into debugger… Program loaded. target remote-mobile /tmp/.XcodeGDBRemote-17280-72 Switching to remote-macosx protocol mem 0x1000 0x3fffffff cache mem 0x40000000 0xffffffff none mem 0x00000000 0x0fff none run Running… Error launching remote program: failed to get the task for process 508. Error launching remote program: failed to get the task for process 508. The program being debugged is not being run. The program being debugged is not being run. And here is the code page that calls the URL import "TheLearningMachineAppDelegate.h" import "RootViewController.h" @implementation TheLearningMachineAppDelegate @synthesize window; @synthesize navigationController; pragma mark - pragma mark Application lifecycle (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { RootViewController *rootViewController = (RootViewController *)[navigationController topViewController]; rootViewController.managedObjectContext = self.managedObjectContext; [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; return YES; } (void)applicationWillResignActive:(UIApplication )application { / Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. */ } (void)applicationDidEnterBackground:(UIApplication *)application { [self saveContext]; } (void)applicationWillEnterForeground:(UIApplication )application { / Called as part of the transition from the background to the inactive state: here you can undo many of the changes made on entering the background. */ } (void)applicationDidBecomeActive:(UIApplication )application { / Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. */ } // Method that saves the managed object context before the application terminates. (void)applicationWillTerminate:(UIApplication *)application { [self saveContext]; } (void)saveContext { NSError *error = nil; if (managedObjectContext != nil) { if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); //Replace this implementation with code to handle the error appropriately. //abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button. } } } pragma mark - pragma mark Core Data stack // Returns the managed object context for the application. (NSManagedObjectContext *)managedObjectContext { if (managedObjectContext != nil) { return managedObjectContext; } NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; if (coordinator != nil) { managedObjectContext = [[NSManagedObjectContext alloc] init]; [managedObjectContext setPersistentStoreCoordinator:coordinator]; } return managedObjectContext; } // Returns the managed object model for the application. (NSManagedObjectModel *)managedObjectModel { if (managedObjectModel != nil) { return managedObjectModel; } NSString *modelPath = [[NSBundle mainBundle] pathForResource:@"TheLearningMachine" ofType:@"momd"]; NSURL *modelURL = [NSURL fileURLWithPath:modelPath]; managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; return managedObjectModel; } pragma mark - pragma mark Application's Documents directory // Returns the path to the application's Documents directory. - (NSString *)applicationDocumentsDirectory { return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; } // Returns the persistent store coordinator for the application. - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (persistentStoreCoordinator != nil) { return persistentStoreCoordinator; } NSURL *storeURL = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @"TheLearningMachine.sqlite"]]; NSError *error = nil; persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } return persistentStoreCoordinator; } pragma mark - pragma mark Memory management (void)applicationDidReceiveMemoryWarning:(UIApplication )application { / Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. */ } (void)dealloc { [managedObjectContext release]; [managedObjectModel release]; [persistentStoreCoordinator release]; [window release]; [super dealloc]; } @end

    Read the article

  • iPhone SDK: Orientation (Landscape and Portrait views)

    - by domness
    Okay, I've got my normal app which is in portrait mode. I can force my app to go to landscape mode for a view (using navigationcontroller and viewcontroller) like this: - (void)viewWillAppear:(BOOL)animated { [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; } But then when I go back to the main menu (tableview) it goes straight back to portrait. I try this code: - (void)viewWillAppear:(BOOL)animated { [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait]; } But that doesn't work.. Any ideas?

    Read the article

  • iPad App: Simple Launch View -> SplitViewController

    - by Aurimas
    Hello, I want to create an iPad app that would have a simple view at launch with buttons to different components of the app. Each button then could open up a splitviewcontroller type views. (Interface similar to WebMD: http://itunes.apple.com/us/app/webmd-for-ipad/id373185673?mt=8) I was reading online that Apple does not allow splitviewcontroller inside other controllers (like NavigationController). How do I solve this? Thanks!

    Read the article

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