If you want to add a UISlider to a UIToolbar, you have to wrap the UISlider as a UIBarButtomItem. The following code should help.
// Initialize aSlider = [[UISlider alloc] init]; UIBarButtonItem *sliderAsToolbarItem = [[UIBarButtonItem alloc] initWithCustomView:aSlider]; // Set the width of aSlider [sliderAsToolbarItem setWidth:250.0]; // Add the items to the toolbar [toolbar setItems:[NSArray arrayWithObjects:sliderAsToolbarItem, nil]];
Done =)

That’s great! Thanks very much.
LikeLike
you are welcome =)
LikeLike
Great! Thanks!
LikeLike
good to know that i could help. =)
LikeLike