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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-02-2009, 01:42 AM   #1 (permalink)
New Member
 
Join Date: May 2009
Location: St. Louis, MO
Posts: 17
Newbie09 is on a distinguished road
Question Adding a Sub View inside a frame!?!?

I have a view based application and I added 3 more views to the main window. I can switch between 2 views (Let's say Home & Host). This is controlled by the view in the main window.
My MainView.h looks like this
Quote:
@class HomeView;
@class HostView;
@class SmallView;

@interface MainView : UIView {
IBOutlet HomeView *homeView;
IBOutlet HostView *hostView;
IBOutlet SmallView *smallView;
}
- (IBAction)goHome;
- (IBAction)goHost;
- (IBAction)goSmall;
- (IBAction)hideSmall;
I can swap between Home, Host and SmallView. I want the small view to be displayed at the bottom (Like the Keypad that pops up when u click on a text field)

MainView.m
Quote:
- (IBAction)goSmall{
CGRect smallViewRect = CGRectMake(0, 310, 320, 150);
[homeView addSubview:smallView];
}
I am not sure how to relate the CGRect-smallViewRect to "smallView". This is a view of size (320,150).

Any help is much appreciated

Thanks
Newbie09 is offline   Reply With Quote
Reply

Bookmarks

Tags
subviews

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: 338
5 members and 333 guests
givensur, ipodphone, jbro, mer10, yomo710
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,881
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

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