如何提高iOS 7中工具栏和导航栏上按钮的可用性 [英] How to improve tap-ability of buttons on toolbars and navigation bars in iOS 7

查看:113
本文介绍了如何提高iOS 7中工具栏和导航栏上按钮的可用性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用新的iOS 7平板外观,例如使用+按钮添加新项目,例如iOS的联系人应用程序。在我的应用程序中,+非常难以点击,按钮大小看起来非常小,并且从未在iOS中出现问题< 7现在在iOS 7中是一个问题。

With the new iOS 7 "flat" look, take for example the + button to add new items such as in iOS's Contacts app. In my app, the + is very hard to tap, the button size seems very small and was never an issue in iOS < 7 and now in iOS 7 it is an issue.

我查看了联系人应用程序,如果你试验它,请注意你可以点击的按钮的左边和按钮注册水龙头。同样适用于我在电子邮件项目列表上方的iPad邮件应用程序中注意到的情况,UITableView的编辑按钮也会在编辑一词的最左侧注册。

I looked at the Contacts app and if you experiment with it, notice how far left of the button you can tap and the button registers the tap. The same applies as I noticed in the iPad mail app above the e-mail item list, the Edit button for the UITableView also registers the tap far left of the word "Edit".

如何在导航栏或工具栏上提高此类按钮的分接能力?两者都是BarButtonItems。我主要担心的是+按钮实现,但看起来苹果正在使用的任何技术都是一个很好的设计,可以提高按钮项目的可用性。

How can I improve tap-ability of buttons like this on either navigation bars or toolbars? Both of which are BarButtonItems. My main concern is the + button implementation but it looks like whatever technique Apple is using would be a good design to adopt to improve tap-ability of button items.

谢谢。

推荐答案

如果您使用UIBarButtonSystemItemAdd,您应该可以在距离按钮相当远的地方点击。这是一个屏幕截图,显示我在哪里点击,你可以看到按下按钮:

If you use UIBarButtonSystemItemAdd, you should be able to tap a fairly large distance away from the button. Here's a screenshot showing where I was tapping, and as you can see the button is pressed:

可以使用以下代码创建这样的按钮:

A button like this can be created using code like this:

[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addPressed:)]

您还可以在界面构建器中创建一个:

You can also create one in interface builder:

这篇关于如何提高iOS 7中工具栏和导航栏上按钮的可用性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆