Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 14, 2011, 02:28 PM   #1
ITCreative
macrumors member
 
Join Date: Aug 2011
How hide view Controller

My project is View based and contain 3 controller ,


the first controller contain picker view if user select item from it.


the second controller display.


and the second controller contain button when user touch inside this button


the three controller display.




Now my problem I want hide the first controller when the second display


hint : the first controller is UIViewController




and SecondController is UINavigationController






How hide view Controller ? becouse when secondController display I show in header part of firstController
ITCreative is offline   0 Reply With Quote
Old Aug 14, 2011, 03:17 PM   #2
ViviUO
macrumors 6502
 
Join Date: Jul 2009
Can you supply more details on how you have your view hierarchy set up, as well as some code or the project? Then tell us what you have tried to do, and the outcome.
ViviUO is offline   0 Reply With Quote
Old Aug 14, 2011, 04:02 PM   #3
ITCreative
Thread Starter
macrumors member
 
Join Date: Aug 2011
Thanks a lot






when secondcontroller display, in header show part of firstController








also when touch up inside on button choice1 to display threeController the problem still display










So I want hide the controller before another controller display How do this ?
ITCreative is offline   0 Reply With Quote
Old Aug 14, 2011, 04:37 PM   #4
ArtOfWarfare
macrumors 601
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
I'm just going to mention that you show and hide views, not controllers.

So it might look something like this:

viewController.view.hidden = YES;

Not like this:

viewController.hidden = YES;

Not really sure if that helps at all.
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed.
Including the ones paired with other Macs on your network.
ArtOfWarfare is offline   0 Reply With Quote
Old Aug 14, 2011, 05:07 PM   #5
ITCreative
Thread Starter
macrumors member
 
Join Date: Aug 2011

Thanks a lot

I try it but when select item from picker view in firstController the white screen display not secondController


Code:
- (void)pickerView:(UIPickerView *)pickerView 
	  didSelectRow:(NSInteger)row 
	   inComponent:(NSInteger)component
{

	UINavigationController *navigController = [[UINavigationController alloc] init];
	[self.view addSubview:navigController.view];

	switch (row){

		case 0: 
			break;

		case 1: 
			self.view.hidden = YES;

			[secController displayMenu:1];

			secController = [[SecondViewController alloc] init];

			break;

		case 2:	
			self.view.hidden = YES;

			[secController displayMenu:2];
			secController = [[SecondViewController alloc] init];
			break;

	
:
:
:
:
:
ect
ITCreative is offline   0 Reply With Quote
Old Aug 15, 2011, 07:04 AM   #6
PhoneyDeveloper
macrumors 68020
 
PhoneyDeveloper's Avatar
 
Join Date: Sep 2008
Your life will be easier if you use the navigation controller for all your views. Start with the navbased app template. Then use pushViewController:animated: to make your additional view controllers appear.

Many, many apps work like this.
PhoneyDeveloper is offline   0 Reply With Quote
Old Aug 15, 2011, 02:01 PM   #7
ITCreative
Thread Starter
macrumors member
 
Join Date: Aug 2011



Thanks a lot


but How can hide the row in navigation project because i want use picker view
ITCreative is offline   0 Reply With Quote
Old Aug 15, 2011, 04:56 PM   #8
PhoneyDeveloper
macrumors 68020
 
PhoneyDeveloper's Avatar
 
Join Date: Sep 2008
If I understand your question, if there is a picker view on the rootViewController it will be covered up when you push the second view controller.
PhoneyDeveloper is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: Loading a Progmatically created view Controller LastLine iPhone/iPad Programming 3 Apr 27, 2011 09:25 PM
How would I access a label on another view controller? KiranPanesar iPhone/iPad Programming 11 Apr 19, 2011 10:15 AM
How do you reload table view when you used spilt view controller class? divyaprasad85 iPhone 0 Oct 27, 2010 05:41 AM
Can I push a modal view controller from within another modal view controller? ataylor2009 iPhone/iPad Programming 1 Mar 31, 2010 09:36 AM
How to Show/Hide movie controls in webpage Mister Three Web Design and Development 2 Aug 22, 2008 10:13 AM


All times are GMT -5. The time now is 12:12 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC