uitoolbar

UIToolbar tint on iOS 4

白昼怎懂夜的黑 提交于 2019-11-28 07:39:00
just switched to iOS 4 on my iPhone 3GS and some of my apps broke. One issue I had is that I had a UIToolbar with some buttons, tinted to pink, that worked well on the 3.1.3 OS. After upgrading to iOS 4, the toolbar was still tinted, but the buttons it contained were no longer affected by the tint. The toolbar was pink while the buttons were regular-blue. Looked around for it on the net, but found no reference of such a thing. Anyone knows what broke in the process? (must be frank here - I knew the answer before posting, just didn't know how to load this data to StackOverflow. Thought the

Leaving inputAccessoryView visible after keyboard is dismissed

妖精的绣舞 提交于 2019-11-28 05:47:24
What I'm trying to do is to create something similar to the "find on page" search function in Safari on iPad. I'm using a UIToolbar with some items in it and attached it to the keyboard by setting it as an inputAccessoryView on the UITextField . Works like a charm, but there is one thing I can't figure out. In Safari, when you search for something, the keyboard disappears but the tool bar remains on the bottom of the screen. Does anyone have a clue on how to accomplish this? The only solution I can think of is to respond to a keyboard dismissed event and then pull out the UIToolBar and create

iOS 7 BarButtonItem with image and title

廉价感情. 提交于 2019-11-28 05:31:10
I'm trying to figure out how can I achieve something like this: This is a toolbar and I'd like to keep the button title text without having to create the whole image with icon AND text. How can I add the icon to the left of the UIBarButtonItem while keeping the text set with: UIBarButtonItem *customBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Button" style:UIBarButtonItemStyleBordered target:nil action:nil]; EDIT This is what I achieved with the following code: UIButton *customButton = [UIButton buttonWithType:UIButtonTypeCustom]; [customButton setImage:[UIImage imageNamed:@"Test"]

UIBarButtonItem with UIImage Always Tinted iOS 7

 ̄綄美尐妖づ 提交于 2019-11-28 03:32:20
I'm trying to add a UIBarButtonItem containing a UIImage to a UIToolbar . The image keeps being tinted and I can't get it to show as the original colored image - all I want to do is display an image, verbatim, in a UIBarButtonItem ! I'm following the directions in the iOS 7 transition guide to set the image rendering mode to UIImageRenderingModeAlwaysOriginal . UIImage *image = [UIImage imageNamed:@"myImage.png"]; image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; UIBarButtonItem *ratingImage = [[UIBarButtonItem alloc] initWithImage:image style

How to add a UIToolbar programmatically to an iOS app?

假装没事ソ 提交于 2019-11-28 03:23:23
Can't seem to find a tutorial which does as the question title describes. I'd like to understand just where the UIToolbar needs to be declared and how to get it onto my view layer. UIToolbar is a subclass of UIView , so the short answer to your question is: just like any other view. Specifically, this is an example of how to programmatically create a toolbar. The context in this snippet is viewDidLoad of a view controller. UIToolbar *toolbar = [[UIToolbar alloc] init]; toolbar.frame = CGRectMake(0, 0, self.view.frame.size.width, 44); NSMutableArray *items = [[NSMutableArray alloc] init];

How to hide the navigation bar and toolbar as scroll down? Swift (like myBridge app)

試著忘記壹切 提交于 2019-11-28 03:21:04
I want to hide a toolbar and nav bar as I scroll down a page. And return it as I scroll up. How is this possible? How would I go about detecting the drag? Do I use pan gesture or is this down with the scrollview? Try this simple approach: Tested in Swift 3 func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) { if(velocity.y>0) { //Code will work without the animation block.I am using animation block incase if you want to set any delay to it. UIView.animate(withDuration: 2.5, delay: 0, options:

Leaving inputAccessoryView visible after keyboard is dismissed

自闭症网瘾萝莉.ら 提交于 2019-11-27 20:23:01
问题 What I'm trying to do is to create something similar to the "find on page" search function in Safari on iPad. I'm using a UIToolbar with some items in it and attached it to the keyboard by setting it as an inputAccessoryView on the UITextField . Works like a charm, but there is one thing I can't figure out. In Safari, when you search for something, the keyboard disappears but the tool bar remains on the bottom of the screen. Does anyone have a clue on how to accomplish this? The only solution

InputAccessoryView docked at bottom

我是研究僧i 提交于 2019-11-27 17:15:02
I'm trying to achieve similar positioning behavior as the bottom text input bar in Apple's Messages app. I have tried many approaches, searched high and low and there are many similar questions but none have been satisfactory. To specify: There is a UIToolbar at the bottom of the view The toolbar is to follow the keyboard as the keyboard appears and disappears The toolbar should stay on top of the keyboard when the keyboard is visible When the keyboard is hidden, the toolbar stays ("docked") at the bottom of the view The proposed solutions: Manually animate the toolbar in response to keyboard

jsqmessageviewcontroller ios11 toolbar

白昼怎懂夜的黑 提交于 2019-11-27 16:38:29
问题 I have tried the swift example of JSQMessageViewController inside iOS 11 simulator. Here is the result:screenshot I have tried using safe area margin and modify the toolbar constraint but there is still no difference. It seems that the toolbar is outside UIWindow (UITextEffectsWindow instead). Is there any solution? 回答1: Just add an extension for JSQMessagesInputToolbar extension JSQMessagesInputToolbar { override open func didMoveToWindow() { super.didMoveToWindow() if #available(iOS 11.0, *

Setting Toolbar Items of UINavigationController

余生长醉 提交于 2019-11-27 15:12:51
问题 In iPhone OS 3.0, you can set the toolbar items of a UINavigationController using the setToolbarItems:animated: method. However, this requires you pass in an array of UIToolbarItems. While I could programmatically create these toolbar items, I'd rather create them in Interface Builder if possible. With this in mind, I have created a UIToolbar in "MyGreatViewController.xib" and have populated it with the wanted toolbar items. Then, in "MyGreatViewController.m", I get the items from the toolbar