uitoolbar

jsqmessageviewcontroller ios11 toolbar

青春壹個敷衍的年華 提交于 2019-11-29 02:22:43
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? ERbittuu Just add an extension for JSQMessagesInputToolbar extension JSQMessagesInputToolbar { override open func didMoveToWindow() { super.didMoveToWindow() if #available(iOS 11.0, *), let window = self.window { let anchor = window.safeAreaLayoutGuide.bottomAnchor bottomAnchor

Adding tool bar on top of the uikeyboard

余生长醉 提交于 2019-11-29 02:21:04
问题 I have a toolbar and i would like to place it on top of the keyboard. In the keyboardwillshow notification, i tried to add toolbar to the keyboard but no luck, i cant add Please let me know UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:1]; UIView* keyboard; for(int i = 0; i < [tempWindow.subviews count]; i++) { //Get a reference of the current view keyboard = [tempWindow.subviews objectAtIndex:i]; //Check to see if the description of the view we have

Setting Toolbar Items of UINavigationController

 ̄綄美尐妖づ 提交于 2019-11-29 00:10:10
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 and pass them to setToolbarItems:animated: : - (void)viewDidLoad { [super viewDidLoad]; [self

Custom UIBarButtonItems from UIButtons with custom images - is it possible to make the tap targets larger?

两盒软妹~` 提交于 2019-11-28 23:25:27
I'm making UIBarButtons as follows: // Create "back" UIBarButtonItem UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; backButton.frame = CGRectMake(0, 0, 28, 17); [backButton addTarget:self action:@selector(backButtonTapped) forControlEvents:UIControlEventTouchUpInside]; backButton.showsTouchWhenHighlighted = YES; UIImage *backButtonImage = [UIImage imageNamed:@"back-button.png"]; [backButton setBackgroundImage:backButtonImage forState:UIControlStateNormal]; UIBarButtonItem *backBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton]; [toolBarItems addObject

How to add a UIToolbar to a UITableViewController programmatically?

丶灬走出姿态 提交于 2019-11-28 17:50:49
I have opted to use a UITableViewController without a nib. I need a UIToolbar at the bottom with two buttons. What is the simplest way of doing that? P.S. I know that I can easily use a UIViewController and add a UITableView however I want things to look consistent across the app. Can someone help? I saw the following example and I am not sure on its validity: (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; //Initialize the toolbar toolbar = [[UIToolbar alloc] init]; toolbar.barStyle = UIBarStyleDefault; //Set the toolbar to fit the width of the app. [toolbar sizeToFit];

Custom background image on UIToolbar in IOS5 SDK

試著忘記壹切 提交于 2019-11-28 16:43:14
Downloaded IOS5 SDK yesterday, and this code which I use to set my UIToolbar's background to a custom image stopped working. If I set the target to IOS4.3 and below it still works. [self.bizToolbar insertSubview:[[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"navbar-iphone.png"]] autorelease] atIndex:0]; Anybody encountered this yet on IOS 5? Simone You can use: [[UIToolBar appearance] setBackgroundImage:toolBarIMG forBarMetrics:UIBarMetricsDefault]; (new in iOS 5) loretoparisi Suppose you linked iOS5 beta SDK, you could do something like this if([navigationBar respondsToSelector:

iOS开发UINavigation系列三——工具栏UIToolBar

♀尐吖头ヾ 提交于 2019-11-28 12:37:46
iOS开发UINavigation系列三——工具栏UIToolBar iOS中除了UINavinationBar之外,还有工具栏UIToolBar可以供我们使用,工具栏和导航栏十分类似,只是功能更加简单,工具栏中也有UIBarButtonItem按钮,在前两篇博客中,对导航栏和导航项都进行的讨论,地址如下: UINavigationBar: http://my.oschina.net/u/2340880/blog/527706 UINavigationItem: http://my.oschina.net/u/2340880/blog/527781 导航栏一般会出现在视图的头部,与之相对,工具栏一般会出现在视图的的底部,上面可以填充一些按钮,提供给用户一些操作。创建一个工具栏如下: self.view.backgroundColor = [UIColor grayColor]; UIToolbar * tool = [[UIToolbar alloc]initWithFrame:CGRectMake(0, self.view.frame.size.height-40, 320, 40)]; [self.view addSubview:tool]; 下面是UIToolBar中的一些方法,其中大部分在UINavigationBar中都有涉及,这里只做简单的介绍: //工具栏的风格

How to create this toolbar programmatically [closed]

痴心易碎 提交于 2019-11-28 11:20:07
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I am really having a hard time creating a UIToolBar programmatically(no xib file). This is what I would like to create. But till now, I feel I have not approached it in the right way. I have tried adding a

UIToolbar UIBarButtonItem with both image and title has very dim text

你离开我真会死。 提交于 2019-11-28 10:31:22
My iPhone view adds some custom buttons to its toolbar. Each button has both an image and textual title, and is created like this: UIBarButtonItem *fooButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"foo.png"] style:UIBarButtonItemStylePlain target:self action:@selector(fooButtonPressed:)]; fooButton.title=@"Foo"; The title's text displays very dim; it looks like it has an alpha of about 0.5. If I use the default UIToolBar barStyle, I can't read the text at all. When using UIBarStyleBlack I can read the text but it still looks very dim. I also tried initWithTitle, and then

iOS - using UISearchDisplayController with UISearchBar that is UIBarButtonItem in UIToolbar

ぃ、小莉子 提交于 2019-11-28 10:22:06
Has anyone tried using a UISearchDisplayController with a UISearchBar that is a UIBarButtonItem in a UIToolbar? I would appreciate tips on how to do this successfully. Currently whenever the search controller pops up it redraws the UISearchBar and I'm struggling to maintain a similar look to the UIToolbar Usually you don't want to put a search bar inside a toolbar, however, it seems you want to do something similar to what I did. So here is how I did it, it may be called a hack, but it works like a charm :) First you have to set it up in interface builder like this: Notice that the search is