为 uibutton ios 使用表格视图披露指示器样式

2023-07-09移动开发问题
2

本文介绍了为 uibutton ios 使用表格视图披露指示器样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我有一个自定义视图,我想模仿表格视图单元格中的披露指示符.这可能吗 ?是否有提取该图像的方法?

解决方案

注意必须使用透明背景

这是我能得到的最佳匹配,在 Photoshop 文件中:

请注意,它在下方包含 REAL iOS IMAGE(来自屏幕截图)作为图层,因此您可以进行比较.

<小时>

请注意,这并非完全是 iOS7 中使用的图像.(2013 年 11 月.)要获得准确的图像,只需在您的模拟器中以视网膜运行应用程序,然后制作屏幕截图.

I have a custom view and i want to imitate the disclosure indicator found in table view cells. Is this possible ? Is there anyway of extracting that image ?

解决方案

Note that you must use a transparent background

Here's the best possible match I can get, in a photoshop file:

Note that it includes the REAL iOS IMAGE (from a screenshot) underneath as a layer, so you can compare.

http://www.filedropper.com/fakearrowiosnov2013psd


It seems like VBK wants the single chevron from the UITableView collection. Which is called 'Disclosure Indicator' as opposed to the one available from UIButton which is 'Detail Disclosure'.

I think you want something like this:

It is 50x80 with a transparent background. Use this image on top of a button or UIImageView. Resize it to whatever size you'd like your button to be. Apple recommends a hit target of no less than 40x40. I sized it to 10x16 in my storyboard, but I am using a transparent button overlay so the size doesn't matter.

Image Mirror : http://imgur.com/X00qn0Z.png


Just note however this is not precisely the image used in iOS7. (Nov 2013.) To get the exact image, simply run an app in retina in your simulator, and make a screenshot.

这篇关于为 uibutton ios 使用表格视图披露指示器样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

硬件音量按钮更改应用程序音量
Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)...
2024-08-12 移动开发问题
10

恢复游戏 cocos2d
Resume game cocos2d(恢复游戏 cocos2d)...
2024-08-12 移动开发问题
6

Cocos2D + 仅禁用 Retina iPad 图形
Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)...
2024-08-12 移动开发问题
10

[ios.cocos2d+box2d]如何禁用自动旋转?
[ios.cocos2d+box2d]how to disable auto-rotation?([ios.cocos2d+box2d]如何禁用自动旋转?)...
2024-08-12 移动开发问题
7

从 Documents 目录存储和读取文件 iOS 5
Storing and reading files from Documents directory iOS 5(从 Documents 目录存储和读取文件 iOS 5)...
2024-08-12 移动开发问题
9

如何在 cocos2d 环境之外实现 cocos2d 游戏的虚拟摇杆?
How can I implement a virtual joystick for a cocos2d game outside the cocos2d environment?(如何在 cocos2d 环境之外实现 cocos2d 游戏的虚拟摇杆?)...
2024-08-12 移动开发问题
13