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

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 27, 2012, 09:21 AM   #1
sajjadzare
macrumors newbie
 
Join Date: Sep 2010
How to move between views in mac ? (change view)

magine that i put a button on a view(view1) and want to go to another view(view2) when user click on it and come back to first view when click on button that i put on view2. how can i do it?i use below code but when i want come back occur error.

Code:
//button on view1
View2 *v2=[[View2 alloc]initWithNibName:@"View2" bundle:nil];
[self.view addSubview:v2.view];
--------------------------------------
//button on view2
[self.view removeFromSuperview];
sajjadzare is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
How to change drag and drop to move by default? mkilci OS X Mavericks (10.9) 5 May 15, 2014 05:38 AM
View visibility up to CollectionView's move erdinc27 iPhone/iPad Programming 0 Mar 5, 2014 03:40 AM
have scroll view bounce between 2 views straber iPhone/iPad Programming 2 Feb 13, 2013 05:59 PM
Best Way To Move View Up When Keyboard Shows loon3y iPhone/iPad Programming 7 Oct 9, 2012 03:42 AM
Views & view controllers - what is the correct way to structure? MickeyT iPhone/iPad Programming 11 Aug 8, 2012 06:29 PM

Forum Jump

All times are GMT -5. The time now is 08:26 PM.

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

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