I have added the Toolbar dynamically and in that i added bar button dynamically but it appears on left side I want it to appear on the Right Side. Can AnyOne help me Out with this My code Goes Like this CGRect frame = CGRectMake(0, 205, 320, 40); UIToolbar *toolbar = [[UIToolbar alloc]initWithFrame:frame]; toolbar.barStyle =UIBarStyleBlackTranslucent; toolbar.tintColor = [UIColor darkGrayColor];
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle: @"Done" style:UIBarButtonItemStyleDone target:self action:@selector(foo)]; NSArray *array = [[NSArray alloc]initWithObjects:backButton,nil];
[toolbar setItems:array];