HapticButton:基于3D Touch压力触发的按钮,类似于iOS 11控制中心

触觉按钮描述HapticButton复制iOS 10和11控制中心以及Home应用程序中按钮的行为。需要配备3D Touch的设备才能完全体验支持的设备上的触觉反馈。作为UIControl的子类实现,因此可以根据需要进一步自定义它。用户按下按钮并以最小压力阈值激活3D Touch(您可以通过feedbackThreshold属性指定最小值以触发按钮)。这允许进行很酷的交互,当触发按钮时会向用户提供触觉反馈。为了获得最佳体验,请将示例安装在设备上。示例项目显示了如何以几种不同的方式设置HapticButton,使用UILabel创建一个按钮。
zip
HapticButton-master.zip 预估大小:58个文件
folder
HapticButton-master 文件夹
file
.gitattributes 28B
file
example.gif 444KB
file
.swift-version 4B
file
HapticButton.podspec 928B
file
LICENSE 1KB
file
_Pods.xcodeproj 27B
folder
HapticButton 文件夹
folder
Assets 文件夹
folder
.gitkeep 文件夹
folder
Classes 文件夹
folder
.gitkeep 文件夹
file
HapticButton.swift 7KB
folder
Example 文件夹
folder
Pods 文件夹
file
Manifest.lock 280B
folder
Target Support Files 文件夹
folder
Pods-HapticButton_Example 文件夹
file
Pods-HapticButton_Example-frameworks.sh 4KB
file
Pods-HapticButton_Example.modulemap 140B
file
Pods-HapticButton_Example.debug.xcconfig 678B
file
Info.plist 828B
file
Pods-HapticButton_Example-dummy.m 154B
file
Pods-HapticButton_Example.release.xcconfig 678B
file
Pods-HapticButton_Example-acknowledgements.plist 2KB
file
Pods-HapticButton_Example-resources.sh 5KB
file
Pods-HapticButton_Example-umbrella.h 342B
file
Pods-HapticButton_Example-acknowledgements.markdown 1KB
folder
HapticButton 文件夹
file
HapticButton.modulemap 114B
file
Info.plist 828B
file
HapticButton-dummy.m 128B
file
HapticButton-umbrella.h 316B
file
HapticButton.xcconfig 535B
file
HapticButton-prefix.pch 195B
folder
Pods-HapticButton_Tests 文件夹
file
Info.plist 828B
file
Pods-HapticButton_Tests.release.xcconfig 529B
file
Pods-HapticButton_Tests-acknowledgements.plist 805B
file
Pods-HapticButton_Tests-resources.sh 5KB
file
Pods-HapticButton_Tests.debug.xcconfig 529B
file
Pods-HapticButton_Tests-umbrella.h 338B
file
Pods-HapticButton_Tests-acknowledgements.markdown 133B
file
Pods-HapticButton_Tests.modulemap 136B
file
Pods-HapticButton_Tests-frameworks.sh 3KB
file
Pods-HapticButton_Tests-dummy.m 150B
folder
Local Podspecs 文件夹
file
HapticButton.podspec.json 552B
folder
Pods.xcodeproj 文件夹
folder
xcshareddata 文件夹
folder
xcschemes 文件夹
file
HapticButton.xcscheme 2KB
file
project.pbxproj 34KB
file
Podfile.lock 280B
folder
HapticButton.xcworkspace 文件夹
file
contents.xcworkspacedata 230B
folder
HapticButton.xcodeproj 文件夹
folder
xcshareddata 文件夹
folder
xcschemes 文件夹
file
HapticButton-Example.xcscheme 4KB
folder
project.xcworkspace 文件夹
file
contents.xcworkspacedata 157B
file
project.pbxproj 17KB
file
Podfile 164B
folder
HapticButton 文件夹
file
ViewController.swift 1KB
file
Info.plist 1KB
file
AppDelegate.swift 2KB
folder
Base.lproj 文件夹
file
Main.storyboard 12KB
file
LaunchScreen.xib 4KB
folder
Images.xcassets 文件夹
folder
swift.imageset 文件夹
file
swift.png 11KB
file
Contents.json 302B
folder
berlin.imageset 文件夹
file
berlin.jpg 1.23MB
file
Contents.json 303B
folder
AppIcon.appiconset 文件夹
file
Contents.json 753B
file
Contents.json 62B
file
README.md 5KB
file
.gitignore 1KB
...
zip 文件大小:1.72MB