Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AbhishekApple

macrumors member
Original poster
Aug 5, 2010
86
0
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....
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:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.