Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tutorials > Tutorial Requests

Reply
 
LinkBack Thread Tools Display Modes
Old 08-25-2009, 04:25 PM   #1 (permalink)
Banned
 
Join Date: Aug 2009
Posts: 7
Post Tutorial Request: 4 subviews inside a subview ?

I have been able to create simple UI apps, but now, im trying to create a more complex UI app, the MainWindow.xib, has a tab bar with 4 tabs, what i've done so far is the main structure of the app, all 4 tabs work, and they each have a different view, but, what i want to do in one of those tabs is:
-show 4 buttons, when either one is pressed, it changes the view, and in that view those same 4 buttons have to be there to be able to swap to the 4 views from either, de first view or the other 4 subviews.

-so far, i've been able to switch between 2 views, but those are subviews of MainWindow.xib,and using only 1 button, this time i need 4 subviews of a subview using 4 buttons.

and what i've done about this tab is:
-created 4 UIViewControllerSubClass
-created 4 new xib files, one for each view...
-in the MainWindow.xib's subview header file, i declared outlets for the 4 buttons im going to use.

I know some of you guys are pros, and this things are basic stuff for you, i'd apreciate your help...
sgjosed is offline   Reply With Quote
Old 08-25-2009, 04:52 PM   #2 (permalink)
Banned
 
Join Date: Aug 2009
Posts: 7
Default

Quote:
Originally Posted by sgjosed View Post
I have been able to create simple UI apps, but now, im trying to create a more complex UI app, the MainWindow.xib, has a tab bar with 4 tabs, what i've done so far is the main structure of the app, all 4 tabs work, and they each have a different view, but, what i want to do in one of those tabs is:
-show 4 buttons, when either one is pressed, it changes the view, and in that view those same 4 buttons have to be there to be able to swap to the 4 views from either, de first view or the other 4 subviews.

-so far, i've been able to switch between 2 views, but those are subviews of MainWindow.xib,and using only 1 button, this time i need 4 subviews of a subview using 4 buttons.

and what i've done about this tab is:
-created 4 UIViewControllerSubClass
-created 4 new xib files, one for each view...
-in the MainWindow.xib's subview header file, i declared outlets for the 4 buttons im going to use.

I know some of you guys are pros, and this things are basic stuff for you, i'd apreciate your help...
I forgot to put some of my code, here it is:
-the .h file of the MainWindow.xib subview:
Code:
#import <UIKit/UIKit.h>

@class NoCircula1;
@class NoCircula2;
@class NoCircula3;
@class Calendario;


@interface NoCirculaViewController : UIViewController {
	IBOutlet UIButton *NoCircula1;
	IBOutlet UIButton *NoCircula2;
	IBOutlet UIButton *NoCircula3;
	IBOutlet UIButton *Calendario;
}

@property (nonatomic, retain) UIButton *NoCircula1;
@property (nonatomic, retain) UIButton *NoCircula2;
@property (nonatomic, retain) UIButton *NoCircula3;
@property (nonatomic, retain) UIButton *Calendario;

@end
-The .m file of the MainWindow.xib subview:


Code:
#import "NoCirculaViewController.h"


@implementation NoCirculaViewController
@synthesize NoCircula1;
@synthesize NoCircula2;
@synthesize NoCircula3;
@synthesize Calendario;

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


@end
sometimes i forget about deallocating memory and some details like that, so please feel free to correct me, and im not putting the code from my 4 subviews classes, because i haven't added anything...
sgjosed is offline   Reply With Quote
Old 08-25-2009, 06:48 PM   #3 (permalink)
Banned
 
Join Date: Aug 2009
Posts: 7
Default

if you dont get what im trying to do, look at the stocks application, where there are some buttons, that display charts for days, months, and years, and when you tap one of them the view changes, but the buttons stay where they are, that is the User Interface i want to acomplish...
sgjosed is offline   Reply With Quote
Old 08-26-2009, 06:55 PM   #4 (permalink)
Banned
 
Join Date: Aug 2009
Posts: 7
Default

Hey guys, i've been doing some research, and im getting to acomplish what im trying to do, but i also want to implement lazyloading, is that a good idea, if the user doesnt always want to use the 4 subviews?
sgjosed is offline   Reply With Quote
Reply

Bookmarks

Tags
subviews, switching views, tab bar application

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 233
16 members and 217 guests
ADY, Alsahir, cacao, dacapo, Dani77, Desert Diva, djohnson, F_Bryant, HemiMG, jansan, M@realobjects, MarkC, prchn4christ, smethorst, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,762
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:52 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0