HomeButton 0.1.0

HomeButton 0.1.0

Nathan Gitter 维护。



  • 作者:
  • nathangitter

Home Button Title Graphic

CI Status Version License Platform iOS Version Xcode Version GitHub top language Code Coverage Tests Passing Code Quality Performance Swift 4.1 Open Source Documentation Demo Gif Haptics Sounds Design Animation Frames Dependencies Gitter Chat App Store Ready Rating Released Badges Star this repo

当苹果发布 iPhone X 时,他们移除了 iPhone 最标志性的功能——Home 按钮。

HomeButton 是一个 CocoaPod,它带来了 Home 按钮。最好的部分是:它真的可以工作

A Demo of the Working Home Button

使用方法

HomeButton 可以通过零行代码添加到您的项目中。是的,没错—不需要代码。只需在您的应用程序中链接框架,Home 按钮就会自动添加。

自定义

HomeButton 支持四种样式:classicclassicWhitemodernmodernWhite

Home Button Style Options

默认样式是 classic。要更改样式,请添加以下行

HomeButton.style = .modern

这可以放在您的应用程序中的任何位置,但它可能最适合放在您的 AppDelegate 的 application(_:didFinishLaunchingWithOptions:) 函数中。

通过 CocoaPods 安装

HomeButton 通过 CocoaPods 提供使用。要安装它,只需将以下行添加到您的 Podfile 中:

pod 'HomeButton'

常见问题解答

这会导致我的应用程序被 App Store 拒绝吗?

它明确违反了指南5.2.1,因为使用了私有API,可能还违反了5.2.5,因为它模仿了系统UI。所以,实话实说,这取决于审查员的心情。

这是一场笑话吗?

因为互联网上有时会丢失讽刺——是的,这是一场笑话。这是一个有趣的愚人节项目。然而,我们认为它实际上是主页按钮的相当好的重现,并且作为UI/UX实验有价值。

作者

Nathan GitterIan McDowell

许可证

MIT。更多信息请参阅LICENSE文件。