Subviews are getting placed on different position on mainView for the same Coordinates
I have created a toolbar in IB and other through code,........
while adding both the tool bars on the same coordinates they are being placed on different position... ???????
Plz any one can suggest....
But if i create both the toolbar through code then they occupy the same position....
Actually i have Scrollview created Through code and want to add toolbar (created in IB) at the bottom of scrollview... but it is not getting placed on required position....
I have created a toolbar in IB and other through code,........
while adding both the tool bars on the same coordinates they are being placed on different position... ???????
Plz any one can suggest....
Code:
@synthesize toolBar;
- (void)viewDidLoad {
[super viewDidLoad];
UIToolbar *tbl = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 210 ,770 , 40)];
[tbl setBarStyle:UIBarStyleBlack];
[self.view addSubview:tbl];
toolBar.frame= CGRectMake(0, 210 ,770 , 40);
[self.view addSubview:toolBar];
}
But if i create both the toolbar through code then they occupy the same position....
Actually i have Scrollview created Through code and want to add toolbar (created in IB) at the bottom of scrollview... but it is not getting placed on required position....
Last edited by a moderator: