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