toolbaritems

ToolbarItems do not look right in iOS

六月ゝ 毕业季﹏ 提交于 2020-04-30 06:27:27
问题 I have a Xamarin.Forms app with FreshMvvm, and am trying to use secondary ToolbarItems. Here is a part of my PageModel code: public override void Init(object initData) { CurrentPage.ToolbarItems.Add(new ToolbarItem() { Text = "About LATICRETE", Command = AboutCommand, Priority = 0, Order = ToolbarItemOrder.Secondary }); CurrentPage.ToolbarItems.Add(new ToolbarItem() { Text = "Call LATICRETE", Command = CallCommand, Priority = 0, Order = ToolbarItemOrder.Secondary }); CurrentPage.ToolbarItems

uinavigationController's toolbar with custom items

我怕爱的太早我们不能终老 提交于 2020-01-03 02:30:12
问题 I am trying to use the NavigationController's toolbar in my app. This toolbar's toolbarItems are suppose to change depending on which view controller is presented. this is very basic. What I am trying to do is to add custom buttons to the toolbar using the UIBarButtonItem's "initWithCustomView:" method. However, the button won't show up on the toolbar. But if I create the UIBarButtonItem using the "initWithTitle:" or "initWithBarButtonSystemItem:" method, the button show up. For example, look

Add spacing between UIToolbar

柔情痞子 提交于 2019-12-21 03:19:19
问题 I have a toolbar that looks like the following: The issue is that it is kind of cluttered and therefore I would like to add some spacing to it. I tried doing: UIBarButtonItem *spacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; self.toolbar_array = [[NSMutableArray alloc] initWithObjects:self.mention, spacer, self.picture, spacer, share, spacer, self.message, nil]; But it still gives me the same thing. How can I add a 10px

Add spacing between UIToolbar

巧了我就是萌 提交于 2019-12-03 09:58:48
I have a toolbar that looks like the following: The issue is that it is kind of cluttered and therefore I would like to add some spacing to it. I tried doing: UIBarButtonItem *spacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; self.toolbar_array = [[NSMutableArray alloc] initWithObjects:self.mention, spacer, self.picture, spacer, share, spacer, self.message, nil]; But it still gives me the same thing. How can I add a 10px between these UIBarButtonItems ? Joe UIBarButtonItem *fixedSpace = [[UIBarButtonItem alloc]