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

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


All times are GMT -5. The time now is 10:07 PM.

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

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