uitoolbar

iOS7 UIStatusBar blur not correct

懵懂的女人 提交于 2019-12-23 10:51:53
问题 I am using a UIToolbar for the controls at the top of the screen (There is no navigation controller) The toolbar has the look I want, however the status bar is entirely clear. I cannot seem to mimic the blur that the UIToolbar has in it's transparency. Has anyone come across a solution to this that does not involve using a navigation controller? 回答1: In Order to achieve this you need to implement methods in the UIBarPositioningDelegate protocol: https://developer.apple.com/library/ios

iOS - [UIColor clearColor] and UIToolbars

帅比萌擦擦* 提交于 2019-12-23 05:27:09
问题 I've been attempting to use [UIColor clearColor] with UIToolbar in an attempt to make a custom control interface more fitting of a "Mechanical" application (Think buttons you would see in a Movie from the 70s). What is happening is that when I set the toolbar to clearColor it is turning it matte black. The image behind it is red, tan and black so I'm sure it's not working as intended. One difference I see is that I'm using the toolbar on a nav controller and not a stand alone UIToolbar . The

UIBarButtonItems not showing up on UIToolbar

∥☆過路亽.° 提交于 2019-12-22 13:10:24
问题 I have a UINavigationController with toolbarHidden set to NO. I have added UIBarButtonItems to navigationController.toolbar. The toolbar is displayed, but the buttons are not... What gives? 回答1: Ok so apparently I misunderstood the usage of the setItems method on navigationController. To remedy this I set the toolbar items on each view controller that is pushed onto the navigation controller's stack. I guess if I wanted to have one toolbar persist through all the views I could add a new

Separator between toolbar items in UIToolbar

梦想与她 提交于 2019-12-22 03:44:55
问题 How to add a separator between buttons in a UIToolbar? Sample image is shown in the below link 回答1: I can think of two ways : (a) You could make them very thin toolbar buttons with user interaction disabled. (b) Your other choice would be to implement your own toolbar. I'd try (a) first ;) 回答2: I did it with a custom view button, with a 1 pixel wide background: UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 1, 44)]; label.backgroundColor = [UIColor whiteColor];

UIToolBar background transparent

与世无争的帅哥 提交于 2019-12-21 06:26:34
问题 I am trying to place UIToolBar in UINavigationBar . UIToolbar* tempFontSizeToolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(kPaginationToolBarOriginX,kPaginationToolBarOriginY,kPaginationToolBarWidth,kPaginationToolBarHeight)]; tempFontSizeToolBar.backgroundColor = [UIColor clearColor]; // create the array to hold the buttons, which then gets added to the toolbar NSMutableArray* buttons = [[NSMutableArray alloc] init]; [tempFontSizeToolBar setTranslucent:YES]; UIBarButtonItem

UIToolBar background transparent

别等时光非礼了梦想. 提交于 2019-12-21 06:26:06
问题 I am trying to place UIToolBar in UINavigationBar . UIToolbar* tempFontSizeToolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(kPaginationToolBarOriginX,kPaginationToolBarOriginY,kPaginationToolBarWidth,kPaginationToolBarHeight)]; tempFontSizeToolBar.backgroundColor = [UIColor clearColor]; // create the array to hold the buttons, which then gets added to the toolbar NSMutableArray* buttons = [[NSMutableArray alloc] init]; [tempFontSizeToolBar setTranslucent:YES]; UIBarButtonItem

Adding UIToolbar with two UIBarButtonItem to a UINavigationBar: poor UIToolbar and what about iPhone 4

混江龙づ霸主 提交于 2019-12-20 10:44:32
问题 I'm following the second tip from here. In this tip two UIBarButtonItems are put together in a UIToolbar. Finally, the UIToolbar is added to the UINavigationBar. Now to my problems: 1) A white line is on top of the UIToolbar. If I increase the size of the UIToolbar, the gradient is wrong. I'm using the following size for the UIToolbar: UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 90, 44.01)]; How can I get rid of the white line? See here: The problem is that there is

Add UIToolBar to all keyboards (swift)

有些话、适合烂在心里 提交于 2019-12-20 09:00:05
问题 I'm trying to add a custom UIToolBar to all of my keyboards with as little repetition. The way I'm currently doing it requires me to add the code to all my viewDidLoads and assign every textfield's delegate to the viewController I'm using. I have tried creating my own UIToolBar subclass but I find that I can't really do that when the target for my "Done" and "cancel" buttons are the self view. Does anyone have any suggestions for creating an easily reusable toolbar? Thanks in advance.

What's the best way to add a view under UINavigationBar in iOS7

二次信任 提交于 2019-12-20 01:10:53
问题 On ios7, a lot of apps (Apple Messages, Facebook Messenger, Calendar)have views appearing under the UINavigationBar, often with what seems to be standard animation. As it seems quite standard and looks a lot with a UIToolBar, I was looking for the standard way of implementing it but couldn't find anything. Is there a better way to adding a UIToolBar to the UINavigationBar? 回答1: You should follow this simple approach. Add a UIToolBar like this. UIBarButtonItem *flexiableItem = [

ToolBar at the top of UIPIckerView in xcode?

故事扮演 提交于 2019-12-18 08:24:23
问题 I need to add a toolbar with done button on the top of UIPickerView . I don't want to use actionSheet because I want the rest of the view to be active. I've gone for the following code: - (BOOL)textFieldDidBeginEditing:(UITextField *)textField { [txtstate resignFirstResponder]; pickerView = [[UIPickerView alloc]init] ; pickerView.frame=CGRectMake(10, 75, 180,20); pickerView.delegate = self; pickerView.showsSelectionIndicator = YES; UIToolbar* toolbar = [[UIToolbar alloc] init]; toolbar.frame