├── Images ├── demo.png ├── logo.png └── logo.sketch ├── docs ├── img │ ├── gh.png │ ├── dash.png │ └── carat.png ├── docsets │ ├── Haptica.tgz │ └── Haptica.docset │ │ └── Contents │ │ ├── Resources │ │ ├── docSet.dsidx │ │ └── Documents │ │ │ ├── img │ │ │ ├── gh.png │ │ │ ├── carat.png │ │ │ └── dash.png │ │ │ ├── badge.svg │ │ │ ├── js │ │ │ └── jazzy.js │ │ │ ├── undocumented.json │ │ │ ├── search.json │ │ │ ├── Extensions.html │ │ │ ├── Extensions │ │ │ ├── UIButton.html │ │ │ ├── UIControlEvents.html │ │ │ ├── UIControl │ │ │ │ └── Event.html │ │ │ └── UIControl.html │ │ │ ├── Protocols.html │ │ │ ├── css │ │ │ ├── highlight.css │ │ │ └── jazzy.css │ │ │ └── Enums │ │ │ ├── Note.html │ │ │ ├── HapticFeedbackStyle.html │ │ │ └── HapticFeedbackType.html │ │ └── Info.plist ├── badge.svg ├── js │ └── jazzy.js ├── search.json ├── Extensions.html ├── Extensions │ ├── UIButton.html │ ├── UIControlEvents.html │ ├── UIControl │ │ └── Event.html │ └── UIControl.html ├── Protocols.html ├── css │ ├── highlight.css │ └── jazzy.css ├── Enums │ ├── Note.html │ ├── HapticFeedbackStyle.html │ └── HapticFeedbackType.html ├── undocumented.json └── Enums.html ├── Haptica.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── Haptica.xcscheme │ └── Example.xcscheme ├── Example ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── AppDelegate.swift ├── Base.lproj │ └── LaunchScreen.storyboard └── ViewController.swift ├── .github ├── workflows │ ├── ci.yml │ └── swift.yml ├── PULL_REQUEST_TEMPLATE.md ├── ISSUE_TEMPLATE.md ├── CODE_OF_CONDUCT.md └── CONTRIBUTING.md ├── .travis.yml ├── Sources ├── Logs.swift ├── Haptica.h ├── Extensions.swift ├── Associated.swift ├── Hapticable.swift └── Haptic.swift ├── Haptica.podspec ├── Package.swift ├── LICENSE ├── .gitignore ├── CHANGELOG.md └── README.md /Images/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efremidze/Haptica/HEAD/Images/demo.png -------------------------------------------------------------------------------- /Images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efremidze/Haptica/HEAD/Images/logo.png -------------------------------------------------------------------------------- /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efremidze/Haptica/HEAD/docs/img/gh.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efremidze/Haptica/HEAD/docs/img/dash.png -------------------------------------------------------------------------------- /Images/logo.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efremidze/Haptica/HEAD/Images/logo.sketch -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efremidze/Haptica/HEAD/docs/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/Haptica.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efremidze/Haptica/HEAD/docs/docsets/Haptica.tgz -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efremidze/Haptica/HEAD/docs/docsets/Haptica.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efremidze/Haptica/HEAD/docs/docsets/Haptica.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efremidze/Haptica/HEAD/docs/docsets/Haptica.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/efremidze/Haptica/HEAD/docs/docsets/Haptica.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /Haptica.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Swift 2 | on: [push] 3 | jobs: 4 | build: 5 | runs-on: macos-latest 6 | steps: 7 | - uses: actions/checkout@v4 8 | - name: Build 9 | run: set -o pipefail && xcodebuild -project "Haptica.xcodeproj" -scheme "Example" CODE_SIGNING_ALLOWED=NO clean build | xcpretty 10 | -------------------------------------------------------------------------------- /Haptica.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | os: osx 2 | osx_image: xcode10.2 3 | script: 4 | - xcodebuild clean -project Haptica.xcodeproj -scheme Haptica -destination "platform=iOS Simulator,name=iPhone X,OS=12.2" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -quiet 5 | - xcodebuild clean -project Haptica.xcodeproj -scheme Example -destination "platform=iOS Simulator,name=iPhone X,OS=12.2" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -quiet 6 | -------------------------------------------------------------------------------- /.github/workflows/swift.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Swift project 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift 3 | 4 | name: Swift Package 5 | on: [push] 6 | jobs: 7 | build: 8 | runs-on: macos-latest 9 | steps: 10 | - uses: actions/checkout@v4 11 | - name: Build 12 | run: swift build --triple arm64-apple-ios14.0 --sdk $(xcrun --sdk iphoneos --show-sdk-path) 13 | -------------------------------------------------------------------------------- /Sources/Logs.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Logs.swift 3 | // Haptica 4 | // 5 | // Created by Lasha Efremidze on 5/2/25. 6 | // Copyright © 2025 efremidze. All rights reserved. 7 | // 8 | 9 | import os.log 10 | 11 | enum HapticaLog { 12 | static var isEnabled = true // or conditionally compile with DEBUG flag 13 | 14 | static func info(_ message: String) { 15 | if isEnabled { print("[Haptica] \(message)") } 16 | } 17 | 18 | static func error(_ message: String) { 19 | if isEnabled { print("[Haptica ❌] \(message)") } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Haptica.h: -------------------------------------------------------------------------------- 1 | // 2 | // Haptica.h 3 | // Haptica 4 | // 5 | // Created by Lasha Efremidze on 4/7/17. 6 | // Copyright © 2017 efremidze. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Haptica. 12 | FOUNDATION_EXPORT double HapticaVersionNumber; 13 | 14 | //! Project version string for Haptica. 15 | FOUNDATION_EXPORT const unsigned char HapticaVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example 4 | // 5 | // Created by Lasha Efremidze on 4/7/17. 6 | // Copyright © 2017 efremidze. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Sources/Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Extensions.swift 3 | // Haptica 4 | // 5 | // Created by Lasha Efremidze on 8/16/18. 6 | // Copyright © 2018 efremidze. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIControl.Event: Hashable { 12 | public var hashValue: Int { 13 | return Int(rawValue) 14 | } 15 | } 16 | 17 | func == (lhs: UIControl.Event, rhs: UIControl.Event) -> Bool { 18 | return lhs.rawValue == rhs.rawValue 19 | } 20 | 21 | extension OperationQueue { 22 | static var serial: OperationQueue { 23 | let queue = OperationQueue() 24 | queue.maxConcurrentOperationCount = 1 25 | return queue 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.haptica 7 | CFBundleName 8 | Haptica 9 | DocSetPlatformFamily 10 | haptica 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ### Checklist 4 | - [ ] I've tested my changes. 5 | - [ ] I've read the [Contribution Guidelines](CONTRIBUTING.md). 6 | - [ ] I've updated the documentation if necessary. 7 | 8 | ### Motivation and Context 9 | 10 | 11 | 12 | 13 | 14 | ### Description 15 | 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ### New Issue Checklist 4 | 5 | 6 | - [ ] I updated Haptica to the latest version. 7 | - [ ] I read the [Contribution Guidelines](https://github.com/efremidze/Haptica/blob/master/.github/CONTRIBUTING.md). 8 | - [ ] I read the [documentation](https://github.com/efremidze/Haptica). 9 | - [ ] I searched for [existing GitHub issues](https://github.com/efremidze/Haptica/issues). 10 | 11 | ### Issue Description 12 | 13 | 14 | 15 | ### Environment 16 | 17 | - **iOS Version**: [INSERT iOS VERSION HERE] 18 | - **Device(s)**: [INSERT DEVICE(S) HERE] 19 | -------------------------------------------------------------------------------- /Sources/Associated.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Associated.swift 3 | // Haptica 4 | // 5 | // Created by Lasha Efremidze on 4/7/17. 6 | // Copyright © 2017 efremidze. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | private class Associated: NSObject { 12 | let value: T 13 | init(_ value: T) { 14 | self.value = value 15 | } 16 | } 17 | 18 | protocol Associable {} 19 | 20 | extension Associable where Self: AnyObject { 21 | 22 | func getAssociatedObject(_ key: UnsafeRawPointer) -> T? { 23 | return (objc_getAssociatedObject(self, key) as? Associated).map { $0.value } 24 | } 25 | 26 | func setAssociatedObject(_ key: UnsafeRawPointer, _ value: T?) { 27 | objc_setAssociatedObject(self, key, value.map { Associated($0) }, .OBJC_ASSOCIATION_RETAIN) 28 | } 29 | 30 | } 31 | 32 | extension NSObject: Associable {} 33 | -------------------------------------------------------------------------------- /Haptica.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint Magnetic.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'Haptica' 11 | s.version = '4.0.0' 12 | s.summary = 'Easy Haptic Feedback' 13 | s.homepage = 'https://github.com/efremidze/Haptica' 14 | s.license = { :type => 'MIT', :file => 'LICENSE' } 15 | s.author = { 'efremidze' => 'efremidzel@hotmail.com' } 16 | s.documentation_url = 'https://efremidze.github.io/Haptica/' 17 | s.source = { :git => 'https://github.com/efremidze/Haptica.git', :tag => s.version.to_s } 18 | s.ios.deployment_target = '13.0' 19 | s.swift_version = '5.0' 20 | s.source_files = 'Sources/*.swift' 21 | end 22 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.9 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "Haptica", 8 | platforms: [ 9 | .iOS(.v13) 10 | ], 11 | products: [ 12 | // Products define the executables and libraries produced by a package, and make them visible to other packages. 13 | .library( 14 | name: "Haptica", 15 | targets: ["Haptica"]) 16 | ], 17 | dependencies: [ 18 | // Dependencies declare other packages that this package depends on. 19 | // .package(url: /* package url */, from: "1.0.0"), 20 | ], 21 | targets: [ 22 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 23 | // Targets can depend on other targets in this package, and on products in packages which this package depends on. 24 | .target( 25 | name: "Haptica", 26 | dependencies: [], 27 | path: "Sources" 28 | ) 29 | ] 30 | ) 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Lasha Efremidze 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 3% 23 | 24 | 25 | 3% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 6% 23 | 24 | 25 | 6% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | # Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | -------------------------------------------------------------------------------- /Example/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Example 4 | // 5 | // Created by Lasha Efremidze on 4/7/17. 6 | // Copyright © 2017 efremidze. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Haptica 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet weak var selection: UIButton! { 15 | didSet { 16 | selection.addHaptic(.selection, forControlEvents: .touchDown) 17 | } 18 | } 19 | 20 | @IBOutlet weak var impactLight: UIButton! { 21 | didSet { 22 | impactLight.addHaptic(.impact(.light), forControlEvents: .touchDown) 23 | } 24 | } 25 | 26 | @IBOutlet weak var impactMedium: UIButton! { 27 | didSet { 28 | impactMedium.addHaptic(.impact(.medium), forControlEvents: .touchDown) 29 | } 30 | } 31 | 32 | @IBOutlet weak var impactHeavy: UIButton! { 33 | didSet { 34 | impactHeavy.addHaptic(.impact(.heavy), forControlEvents: .touchDown) 35 | } 36 | } 37 | 38 | @IBOutlet weak var impactSoft: UIButton! { 39 | didSet { 40 | impactSoft.addHaptic(.impact(.soft), forControlEvents: .touchDown) 41 | } 42 | } 43 | 44 | @IBOutlet weak var impactRigid: UIButton! { 45 | didSet { 46 | impactRigid.addHaptic(.impact(.rigid), forControlEvents: .touchDown) 47 | } 48 | } 49 | 50 | @IBOutlet weak var notificationSuccess: UIButton! { 51 | didSet { 52 | notificationSuccess.addHaptic(.notification(.success), forControlEvents: .touchDown) 53 | } 54 | } 55 | 56 | @IBOutlet weak var notificationWarning: UIButton! { 57 | didSet { 58 | notificationWarning.addHaptic(.notification(.warning), forControlEvents: .touchDown) 59 | } 60 | } 61 | 62 | @IBOutlet weak var notificationError: UIButton! { 63 | didSet { 64 | notificationError.addHaptic(.notification(.error), forControlEvents: .touchDown) 65 | } 66 | } 67 | 68 | @IBAction func playVibrationPattern(_ sender: UIButton) { 69 | Haptic.play("..oO-Oo..", delay: 0.1) 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change log 2 | 3 | ## [Version 4.0.0](https://github.com/efremidze/Haptica/releases/tag/4.0.0) 4 | Released on 2025-05-01 5 | 6 | - Added Core Haptics Support 7 | - Added File Support (playing AHAP files) 8 | - Dropped iOS 12 Support 9 | 10 | ## [Version 3.0.3](https://github.com/efremidze/Haptica/releases/tag/3.0.3) 11 | Released on 2021-10-15 12 | 13 | - Added rigid and soft haptic feedback to patterns 14 | 15 | ## [Version 3.0.2](https://github.com/efremidze/Haptica/releases/tag/3.0.2) 16 | Released on 2019-12-04 17 | 18 | - iOS 13 Support 19 | 20 | ## [Version 3.0.1](https://github.com/efremidze/Haptica/releases/tag/3.0.1) 21 | Released on 2019-10-05 22 | 23 | - SPM Support 24 | 25 | ## [Version 3.0.0](https://github.com/efremidze/Haptica/releases/tag/3.0.0) 26 | Released on 2019-04-23 27 | 28 | - Swift 5.0 Support 29 | 30 | ## [Version 2.2.3](https://github.com/efremidze/Haptica/releases/tag/2.2.3) 31 | Released on 2019-01-17 32 | 33 | - Added haptic feedback generation from patterns 34 | 35 | ## [Version 2.2.2](https://github.com/efremidze/Haptica/releases/tag/2.2.2) 36 | Released on 2018-12-05 37 | 38 | - Readded iOS 9 Support 39 | 40 | ## [Version 2.2.1](https://github.com/efremidze/Haptica/releases/tag/2.2.1) 41 | Released on 2018-10-01 42 | 43 | - Swift 4.2 Support 44 | 45 | ## [Version 2.1.1](https://github.com/efremidze/Haptica/releases/tag/2.1.1) 46 | Released on 2018-09-20 47 | 48 | - Updated minimum iOS deployment version to 10.0 49 | - Added Xcode 10 support 50 | 51 | ## [Version 2.0.5](https://github.com/efremidze/Haptica/releases/tag/2.0.5) 52 | Released on 2018-08-15 53 | 54 | - Added addHaptic and removeHaptic to complement UIControl naming 55 | 56 | ## [Version 2.0.3](https://github.com/efremidze/Haptica/releases/tag/2.0.3) 57 | Released on 2018-07-29 58 | 59 | - Bug fix 60 | 61 | ## [Version 2.0.2](https://github.com/efremidze/Haptica/releases/tag/2.0.2) 62 | Released on 2018-04-17 63 | 64 | - Added documentation 65 | 66 | ## [Version 2.0.1](https://github.com/efremidze/Haptica/releases/tag/2.0.1) 67 | Released on 2018-03-30 68 | 69 | - Swift 4.1 Support 70 | 71 | ## [Version 2.0.0](https://github.com/efremidze/Haptica/releases/tag/2.0.0) 72 | Released on 2017-09-20 73 | 74 | - Updated to Swift 4 75 | 76 | ## [Version 1.0.3](https://github.com/efremidze/Haptica/releases/tag/1.0.3) 77 | Released on 2017-07-24 78 | 79 | - Fixed supported platform 80 | 81 | ## [Version 1.0.2](https://github.com/efremidze/Haptica/releases/tag/1.0.2) 82 | Released on 2017-04-10 83 | 84 | - Add button extensions 85 | 86 | ## [Version 1.0.1](https://github.com/efremidze/Haptica/releases/tag/1.0.1) 87 | Released on 2017-04-07 88 | 89 | - Created Project 90 | -------------------------------------------------------------------------------- /Sources/Hapticable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Hapticable.swift 3 | // Haptica 4 | // 5 | // Created by Lasha Efremidze on 4/7/17. 6 | // Copyright © 2017 efremidze. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | private var hapticKey: Void? 12 | private var eventKey: Void? 13 | private var targetsKey: Void? 14 | 15 | public protocol Hapticable: AnyObject { 16 | func trigger(_ sender: Any) 17 | } 18 | 19 | extension Hapticable where Self: UIControl { 20 | 21 | public var isHaptic: Bool { 22 | get { 23 | guard let actions = actions(forTarget: self, forControlEvent: hapticControlEvents ?? .touchDown) else { return false } 24 | return !actions.filter { $0 == #selector(trigger).description }.isEmpty 25 | } 26 | set { 27 | if newValue { 28 | addTarget(self, action: #selector(trigger), for: hapticControlEvents ?? .touchDown) 29 | } else { 30 | removeTarget(self, action: #selector(trigger), for: hapticControlEvents ?? .touchDown) 31 | } 32 | } 33 | } 34 | 35 | public var hapticType: Haptic? { 36 | get { return getAssociatedObject(&hapticKey) } 37 | set { setAssociatedObject(&hapticKey, newValue) } 38 | } 39 | 40 | public var hapticControlEvents: UIControl.Event? { 41 | get { return getAssociatedObject(&eventKey) } 42 | set { setAssociatedObject(&eventKey, newValue) } 43 | } 44 | 45 | private var hapticTargets: [UIControl.Event: HapticTarget] { 46 | get { return getAssociatedObject(&targetsKey) ?? [:] } 47 | set { setAssociatedObject(&targetsKey, newValue) } 48 | } 49 | 50 | public func addHaptic(_ haptic: Haptic, forControlEvents events: UIControl.Event) { 51 | let hapticTarget = HapticTarget(haptic: haptic) 52 | hapticTargets[events] = hapticTarget 53 | addTarget(hapticTarget, action: #selector(hapticTarget.trigger), for: events) 54 | } 55 | 56 | public func removeHaptic(forControlEvents events: UIControl.Event) { 57 | guard let hapticTarget = hapticTargets[events] else { return } 58 | hapticTargets[events] = nil 59 | removeTarget(hapticTarget, action: #selector(hapticTarget.trigger), for: events) 60 | } 61 | 62 | } 63 | 64 | extension UIControl: Hapticable { 65 | @objc public func trigger(_ sender: Any) { 66 | hapticType?.generate() 67 | } 68 | } 69 | 70 | private class HapticTarget { 71 | let haptic: Haptic 72 | init(haptic: Haptic) { 73 | self.haptic = haptic 74 | } 75 | @objc func trigger(_ sender: Any) { 76 | haptic.generate() 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Sources/Haptic.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Haptic.swift 3 | // Haptica 4 | // 5 | // Created by Lasha Efremidze on 4/7/17. 6 | // Copyright © 2017 efremidze. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// Describes impact feedback styles with varying intensity. 12 | public enum HapticFeedbackStyle: Int { 13 | case light, medium, heavy 14 | case soft, rigid 15 | } 16 | 17 | extension HapticFeedbackStyle { 18 | var value: UIImpactFeedbackGenerator.FeedbackStyle { 19 | return UIImpactFeedbackGenerator.FeedbackStyle(rawValue: rawValue)! 20 | } 21 | } 22 | 23 | /// Describes notification feedback types for task outcomes. 24 | public enum HapticFeedbackType: Int { 25 | case success, warning, error 26 | } 27 | 28 | extension HapticFeedbackType { 29 | var value: UINotificationFeedbackGenerator.FeedbackType { 30 | return UINotificationFeedbackGenerator.FeedbackType(rawValue: rawValue)! 31 | } 32 | } 33 | 34 | /// Primary interface for generating haptic feedback in Haptica. 35 | public enum Haptic { 36 | case impact(HapticFeedbackStyle) 37 | case notification(HapticFeedbackType) 38 | case selection 39 | 40 | // Semantic variants 41 | case start 42 | case stop 43 | case increase 44 | case decrease 45 | case success 46 | case failure 47 | case warning 48 | 49 | /// Triggers the haptic feedback corresponding to the case. 50 | public func generate() { 51 | switch self { 52 | case .impact(let style): 53 | let generator = UIImpactFeedbackGenerator(style: style.value) 54 | generator.prepare() 55 | generator.impactOccurred() 56 | 57 | case .notification(let type): 58 | let generator = UINotificationFeedbackGenerator() 59 | generator.prepare() 60 | generator.notificationOccurred(type.value) 61 | 62 | case .selection: 63 | let generator = UISelectionFeedbackGenerator() 64 | generator.prepare() 65 | generator.selectionChanged() 66 | 67 | // Semantic mappings 68 | case .start: 69 | Haptic.impact(.medium).generate() 70 | case .stop: 71 | Haptic.impact(.rigid).generate() 72 | case .increase: 73 | Haptic.impact(.light).generate() 74 | case .decrease: 75 | Haptic.impact(.soft).generate() 76 | case .success: 77 | Haptic.notification(.success).generate() 78 | case .failure: 79 | Haptic.notification(.error).generate() 80 | case .warning: 81 | Haptic.notification(.warning).generate() 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Haptica.xcodeproj/xcshareddata/xcschemes/Haptica.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at efremidzel@hotmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to _Haptica_ 2 | 3 | The following is a set of guidelines for contributing to _Haptica_ on GitHub. 4 | 5 | > Above all, thank you for your interest in the project and for taking the time to contribute! 👍 6 | 7 | ## Asking Questions 8 | 9 | We don't use GitHub as a support forum. 10 | For any usage questions that are not specific to the project itself, 11 | please ask on [Stack Overflow](https://stackoverflow.com) instead. 12 | By doing so, you'll be more likely to quickly solve your problem, 13 | and you'll allow anyone else with the same question to find the answer. 14 | This also allows maintainers to focus on improving the project for others. 15 | 16 | ## Reporting Other Issues 17 | 18 | A great way to contribute to the project 19 | is to send a detailed issue when you encounter a problem. 20 | We always appreciate a well-written, thorough bug report. 21 | 22 | Check that the project issues database 23 | doesn't already include that problem or suggestion before submitting an issue. 24 | If you find a match, add a quick "+1" or "I have this problem too." 25 | Doing this helps prioritize the most common problems and requests. 26 | 27 | Before submitting a new GitHub issue, please make sure to 28 | 29 | - Check out the [documentation](https://github.com/efremidze/Haptica). 30 | - Read the usage guide on [the README](https://github.com/efremidze/Haptica/#usage). 31 | - Search for [existing GitHub issues](https://github.com/efremidze/Haptica/issues). 32 | 33 | If the above doesn't help, please [submit an issue](https://github.com/efremidze/Haptica/issues) on GitHub. 34 | 35 | ## I want to contribute to _Haptica_ 36 | 37 | ### Prerequisites 38 | 39 | To develop _Haptica_, you will need to use an Xcode version compatible with the Swift version specified in the [README](https://github.com/efremidze/Haptica/#requirements). 40 | 41 | ### Checking out the repository 42 | 43 | - Click the “Fork” button in the upper right corner of repo 44 | - Clone your fork: 45 | - `git clone https://github.com//Haptica.git` 46 | - Create a new branch to work on: 47 | - `git checkout -b ` 48 | - A good name for a branch describes the thing you’ll be working on, e.g. `voice-over`, `fix-font-size`, etc. 49 | 50 | That’s it! Now you’re ready to work on _Haptica_. Open the `Haptica.xcworkspace` workspace to start coding. 51 | 52 | ### Things to keep in mind 53 | 54 | - Please do not change the minimum iOS version 55 | - Always document new public methods and properties 56 | 57 | ### Testing your local changes 58 | 59 | Before opening a pull request, please make sure your changes don't break things. 60 | 61 | - The framework and example project should build without warnings 62 | - The example project should run without issues. 63 | 64 | ### Submitting the PR 65 | 66 | When the coding is done and you’ve finished testing your changes, you are ready to submit the PR to the [main repo](https://github.com/efremidze/Haptica). Some best practices are: 67 | 68 | - Use a descriptive title 69 | - Link the issues that are related to your PR in the body 70 | 71 | ## Code of Conduct 72 | 73 | Help us keep _Haptica_ open and inclusive. Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md). 74 | 75 | ## License 76 | 77 | This project is licensed under the terms of the MIT license. See the [LICENSE](LICENSE) file. 78 | 79 | _These contribution guidelines were adapted from [_fastlane_](https://github.com/fastlane/fastlane) guides._ 80 | -------------------------------------------------------------------------------- /Haptica.xcodeproj/xcshareddata/xcschemes/Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/undocumented.json: -------------------------------------------------------------------------------- 1 | { 2 | "warnings": [ 3 | { 4 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 5 | "line": 11, 6 | "symbol": "Haptic", 7 | "symbol_kind": "source.lang.swift.decl.enum", 8 | "warning": "undocumented" 9 | }, 10 | { 11 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 12 | "line": 12, 13 | "symbol": "Haptic.impact(_:)", 14 | "symbol_kind": "source.lang.swift.decl.enumelement", 15 | "warning": "undocumented" 16 | }, 17 | { 18 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 19 | "line": 13, 20 | "symbol": "Haptic.notification(_:)", 21 | "symbol_kind": "source.lang.swift.decl.enumelement", 22 | "warning": "undocumented" 23 | }, 24 | { 25 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 26 | "line": 14, 27 | "symbol": "Haptic.selection", 28 | "symbol_kind": "source.lang.swift.decl.enumelement", 29 | "warning": "undocumented" 30 | }, 31 | { 32 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 33 | "line": 17, 34 | "symbol": "Haptic.generate()", 35 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 36 | "warning": "undocumented" 37 | }, 38 | { 39 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 40 | "line": null, 41 | "symbol": "Hapticable", 42 | "symbol_kind": "source.lang.swift.decl.extension", 43 | "warning": "undocumented" 44 | }, 45 | { 46 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 47 | "line": 15, 48 | "symbol": "Hapticable", 49 | "symbol_kind": "source.lang.swift.decl.protocol", 50 | "warning": "undocumented" 51 | }, 52 | { 53 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 54 | "line": 16, 55 | "symbol": "Hapticable.trigger(_:)", 56 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 57 | "warning": "undocumented" 58 | }, 59 | { 60 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 61 | "line": 21, 62 | "symbol": "Hapticable.isHaptic", 63 | "symbol_kind": "source.lang.swift.decl.var.instance", 64 | "warning": "undocumented" 65 | }, 66 | { 67 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 68 | "line": 35, 69 | "symbol": "Hapticable.hapticType", 70 | "symbol_kind": "source.lang.swift.decl.var.instance", 71 | "warning": "undocumented" 72 | }, 73 | { 74 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 75 | "line": 40, 76 | "symbol": "Hapticable.hapticControlEvents", 77 | "symbol_kind": "source.lang.swift.decl.var.instance", 78 | "warning": "undocumented" 79 | }, 80 | { 81 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 82 | "line": 50, 83 | "symbol": "Hapticable.addHaptic(_:forControlEvents:)", 84 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 85 | "warning": "undocumented" 86 | }, 87 | { 88 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 89 | "line": 56, 90 | "symbol": "Hapticable.removeHaptic(forControlEvents:)", 91 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 92 | "warning": "undocumented" 93 | }, 94 | { 95 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 96 | "line": 65, 97 | "symbol": "UIControl.trigger(_:)", 98 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 99 | "warning": "undocumented" 100 | } 101 | ], 102 | "source_directory": "/Users/home/Documents/Haptica" 103 | } -------------------------------------------------------------------------------- /docs/search.json: -------------------------------------------------------------------------------- 1 | {"Protocols/Hapticable.html#/s:7Haptica10HapticableP7triggeryyypF":{"name":"trigger(_:)","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html#/s:7Haptica10HapticablePAASo9UIControlCRbzrlE8isHapticSbvp":{"name":"isHaptic","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html#/s:7Haptica10HapticablePAASo9UIControlCRbzrlE10hapticTypeAA6HapticOSgvp":{"name":"hapticType","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html#/s:7Haptica10HapticablePAASo9UIControlCRbzrlE19hapticControlEventsSo0cF0VSgvp":{"name":"hapticControlEvents","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html#/s:7Haptica10HapticablePAASo9UIControlCRbzrlE9addHaptic_16forControlEventsyAA0E0O_So0cH0VtF":{"name":"addHaptic(_:forControlEvents:)","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html#/s:7Haptica10HapticablePAASo9UIControlCRbzrlE12removeHaptic16forControlEventsySo0cH0V_tF":{"name":"removeHaptic(forControlEvents:)","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html":{"name":"Hapticable","abstract":"

Undocumented

"},"Extensions/UIControl/Event.html#/s:SH9hashValueSivp":{"name":"hashValue","parent_name":"Event"},"Extensions/UIControl/Event.html":{"name":"Event","parent_name":"UIControl"},"Extensions/UIControl.html#/c:@CM@Haptica@@objc(cs)UIControl(im)trigger:":{"name":"trigger(_:)","abstract":"

Undocumented

","parent_name":"UIControl"},"Extensions/UIControl.html":{"name":"UIControl"},"Enums/Note.html#/s:7Haptica4NoteO6hapticyAcA6HapticOcACmF":{"name":"haptic(_:)","abstract":"

Undocumented

","parent_name":"Note"},"Enums/Note.html#/s:7Haptica4NoteO4waityACSdcACmF":{"name":"wait(_:)","abstract":"

Undocumented

","parent_name":"Note"},"Enums/Haptic.html#/s:7Haptica6HapticO6impactyAcA0B13FeedbackStyleOcACmF":{"name":"impact(_:)","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO12notificationyAcA0B12FeedbackTypeOcACmF":{"name":"notification(_:)","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO9selectionyA2CmF":{"name":"selection","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO8generateyyF":{"name":"generate()","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO5queueSo16NSOperationQueueCvpZ":{"name":"queue","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO4playyySayAA4NoteOGFZ":{"name":"play(_:)","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO4play_5delayySS_SdtFZ":{"name":"play(_:delay:)","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/HapticFeedbackType.html#/s:7Haptica18HapticFeedbackTypeO7successyA2CmF":{"name":"success","abstract":"

Undocumented

","parent_name":"HapticFeedbackType"},"Enums/HapticFeedbackType.html#/s:7Haptica18HapticFeedbackTypeO7warningyA2CmF":{"name":"warning","abstract":"

Undocumented

","parent_name":"HapticFeedbackType"},"Enums/HapticFeedbackType.html#/s:7Haptica18HapticFeedbackTypeO5erroryA2CmF":{"name":"error","abstract":"

Undocumented

","parent_name":"HapticFeedbackType"},"Enums/HapticFeedbackStyle.html#/s:7Haptica19HapticFeedbackStyleO5lightyA2CmF":{"name":"light","abstract":"

Undocumented

","parent_name":"HapticFeedbackStyle"},"Enums/HapticFeedbackStyle.html#/s:7Haptica19HapticFeedbackStyleO6mediumyA2CmF":{"name":"medium","abstract":"

Undocumented

","parent_name":"HapticFeedbackStyle"},"Enums/HapticFeedbackStyle.html#/s:7Haptica19HapticFeedbackStyleO5heavyyA2CmF":{"name":"heavy","abstract":"

Undocumented

","parent_name":"HapticFeedbackStyle"},"Enums/HapticFeedbackStyle.html":{"name":"HapticFeedbackStyle","abstract":"

Undocumented

"},"Enums/HapticFeedbackType.html":{"name":"HapticFeedbackType","abstract":"

Undocumented

"},"Enums/Haptic.html":{"name":"Haptic","abstract":"

Undocumented

"},"Enums/Note.html":{"name":"Note","abstract":"

Undocumented

"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"},"Extensions.html":{"name":"Extensions","abstract":"

The following extensions are available globally.

"},"Protocols.html":{"name":"Protocols","abstract":"

The following protocols are available globally.

"}} -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/search.json: -------------------------------------------------------------------------------- 1 | {"Protocols/Hapticable.html#/s:7Haptica10HapticableP7triggeryyypF":{"name":"trigger(_:)","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html#/s:7Haptica10HapticablePAASo9UIControlCRbzrlE8isHapticSbvp":{"name":"isHaptic","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html#/s:7Haptica10HapticablePAASo9UIControlCRbzrlE10hapticTypeAA6HapticOSgvp":{"name":"hapticType","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html#/s:7Haptica10HapticablePAASo9UIControlCRbzrlE19hapticControlEventsSo0cF0VSgvp":{"name":"hapticControlEvents","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html#/s:7Haptica10HapticablePAASo9UIControlCRbzrlE9addHaptic_16forControlEventsyAA0E0O_So0cH0VtF":{"name":"addHaptic(_:forControlEvents:)","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html#/s:7Haptica10HapticablePAASo9UIControlCRbzrlE12removeHaptic16forControlEventsySo0cH0V_tF":{"name":"removeHaptic(forControlEvents:)","abstract":"

Undocumented

","parent_name":"Hapticable"},"Protocols/Hapticable.html":{"name":"Hapticable","abstract":"

Undocumented

"},"Extensions/UIControl/Event.html#/s:SH9hashValueSivp":{"name":"hashValue","parent_name":"Event"},"Extensions/UIControl/Event.html":{"name":"Event","parent_name":"UIControl"},"Extensions/UIControl.html#/c:@CM@Haptica@@objc(cs)UIControl(im)trigger:":{"name":"trigger(_:)","abstract":"

Undocumented

","parent_name":"UIControl"},"Extensions/UIControl.html":{"name":"UIControl"},"Enums/Note.html#/s:7Haptica4NoteO6hapticyAcA6HapticOcACmF":{"name":"haptic(_:)","abstract":"

Undocumented

","parent_name":"Note"},"Enums/Note.html#/s:7Haptica4NoteO4waityACSdcACmF":{"name":"wait(_:)","abstract":"

Undocumented

","parent_name":"Note"},"Enums/Haptic.html#/s:7Haptica6HapticO6impactyAcA0B13FeedbackStyleOcACmF":{"name":"impact(_:)","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO12notificationyAcA0B12FeedbackTypeOcACmF":{"name":"notification(_:)","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO9selectionyA2CmF":{"name":"selection","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO8generateyyF":{"name":"generate()","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO5queueSo16NSOperationQueueCvpZ":{"name":"queue","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO4playyySayAA4NoteOGFZ":{"name":"play(_:)","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/Haptic.html#/s:7Haptica6HapticO4play_5delayySS_SdtFZ":{"name":"play(_:delay:)","abstract":"

Undocumented

","parent_name":"Haptic"},"Enums/HapticFeedbackType.html#/s:7Haptica18HapticFeedbackTypeO7successyA2CmF":{"name":"success","abstract":"

Undocumented

","parent_name":"HapticFeedbackType"},"Enums/HapticFeedbackType.html#/s:7Haptica18HapticFeedbackTypeO7warningyA2CmF":{"name":"warning","abstract":"

Undocumented

","parent_name":"HapticFeedbackType"},"Enums/HapticFeedbackType.html#/s:7Haptica18HapticFeedbackTypeO5erroryA2CmF":{"name":"error","abstract":"

Undocumented

","parent_name":"HapticFeedbackType"},"Enums/HapticFeedbackStyle.html#/s:7Haptica19HapticFeedbackStyleO5lightyA2CmF":{"name":"light","abstract":"

Undocumented

","parent_name":"HapticFeedbackStyle"},"Enums/HapticFeedbackStyle.html#/s:7Haptica19HapticFeedbackStyleO6mediumyA2CmF":{"name":"medium","abstract":"

Undocumented

","parent_name":"HapticFeedbackStyle"},"Enums/HapticFeedbackStyle.html#/s:7Haptica19HapticFeedbackStyleO5heavyyA2CmF":{"name":"heavy","abstract":"

Undocumented

","parent_name":"HapticFeedbackStyle"},"Enums/HapticFeedbackStyle.html":{"name":"HapticFeedbackStyle","abstract":"

Undocumented

"},"Enums/HapticFeedbackType.html":{"name":"HapticFeedbackType","abstract":"

Undocumented

"},"Enums/Haptic.html":{"name":"Haptic","abstract":"

Undocumented

"},"Enums/Note.html":{"name":"Note","abstract":"

Undocumented

"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"},"Extensions.html":{"name":"Extensions","abstract":"

The following extensions are available globally.

"},"Protocols.html":{"name":"Protocols","abstract":"

The following protocols are available globally.

"}} -------------------------------------------------------------------------------- /docs/Extensions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Extensions Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

Extensions

72 |

The following extensions are available globally.

73 | 74 |
75 |
76 |
77 |
    78 |
  • 79 |
    80 | 81 | 82 | 83 | UIControl 84 | 85 |
    86 |
    87 |
    88 |
    89 |
    90 |
    91 | 92 | See more 93 |
    94 |
    95 |
    96 |
  • 97 |
98 |
99 |
100 |
101 | 105 |
106 |
107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/Extensions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Extensions Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

Extensions

72 |

The following extensions are available globally.

73 | 74 |
75 |
76 |
77 |
    78 |
  • 79 |
    80 | 81 | 82 | 83 | UIControl 84 | 85 |
    86 |
    87 |
    88 |
    89 |
    90 |
    91 | 92 | See more 93 |
    94 |
    95 |
    96 |
  • 97 |
98 |
99 |
100 |
101 | 105 |
106 |
107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /docs/Extensions/UIButton.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | UIButton Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (0% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 56 |
57 |
58 |
59 |

UIButton

60 |
61 |
62 |
class UIButton : UIControl, NSCoding
63 | 64 |
65 |
66 | 67 |
68 |
69 |
70 |
    71 |
  • 72 |
    73 | 74 | 75 | 76 | trigger(_:) 77 | 78 |
    79 |
    80 |
    81 |
    82 |
    83 |
    84 |

    Undocumented

    85 | 86 |
    87 |
    88 |

    Declaration

    89 |
    90 |

    Swift

    91 |
    @objc
     92 | public func trigger(_ sender: Any)
    93 | 94 |
    95 |
    96 |
    97 |
    98 |
  • 99 |
100 |
101 |
102 |
103 | 107 |
108 |
109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/Extensions/UIButton.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | UIButton Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (0% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 56 |
57 |
58 |
59 |

UIButton

60 |
61 |
62 |
class UIButton : UIControl, NSCoding
63 | 64 |
65 |
66 | 67 |
68 |
69 |
70 |
    71 |
  • 72 |
    73 | 74 | 75 | 76 | trigger(_:) 77 | 78 |
    79 |
    80 |
    81 |
    82 |
    83 |
    84 |

    Undocumented

    85 | 86 |
    87 |
    88 |

    Declaration

    89 |
    90 |

    Swift

    91 |
    @objc
     92 | public func trigger(_ sender: Any)
    93 | 94 |
    95 |
    96 |
    97 |
    98 |
  • 99 |
100 |
101 |
102 |
103 | 107 |
108 |
109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /docs/Extensions/UIControlEvents.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | UIControlEvents Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (6% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 59 |
60 |
61 |
62 |

UIControlEvents

63 |
64 |
65 |
typealias UIControlEvents = UIControl.Event
66 | 67 |
68 |
69 | 70 |
71 |
72 |
73 |
    74 |
  • 75 |
    76 | 77 | 78 | 79 | hashValue 80 | 81 |
    82 |
    83 |
    84 |
    85 |
    86 |
    87 | 88 |
    89 |
    90 |

    Declaration

    91 |
    92 |

    Swift

    93 |
    public var hashValue: Int { get }
    94 | 95 |
    96 |
    97 |
    98 |
    99 |
  • 100 |
101 |
102 |
103 |
104 | 108 |
109 |
110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /docs/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

Protocols

72 |

The following protocols are available globally.

73 | 74 |
75 |
76 |
77 |
    78 |
  • 79 |
    80 | 81 | 82 | 83 | Hapticable 84 | 85 |
    86 |
    87 |
    88 |
    89 |
    90 |
    91 |

    Undocumented

    92 | 93 | See more 94 |
    95 |
    96 |

    Declaration

    97 |
    98 |

    Swift

    99 |
    public protocol Hapticable : AnyObject
    100 | 101 |
    102 |
    103 |
    104 |
    105 |
  • 106 |
107 |
108 |
109 |
110 | 114 |
115 |
116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/Extensions/UIControlEvents.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | UIControlEvents Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (6% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 59 |
60 |
61 |
62 |

UIControlEvents

63 |
64 |
65 |
typealias UIControlEvents = UIControl.Event
66 | 67 |
68 |
69 | 70 |
71 |
72 |
73 |
    74 |
  • 75 |
    76 | 77 | 78 | 79 | hashValue 80 | 81 |
    82 |
    83 |
    84 |
    85 |
    86 |
    87 | 88 |
    89 |
    90 |

    Declaration

    91 |
    92 |

    Swift

    93 |
    public var hashValue: Int { get }
    94 | 95 |
    96 |
    97 |
    98 |
    99 |
  • 100 |
101 |
102 |
103 |
104 | 108 |
109 |
110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

Protocols

72 |

The following protocols are available globally.

73 | 74 |
75 |
76 |
77 |
    78 |
  • 79 |
    80 | 81 | 82 | 83 | Hapticable 84 | 85 |
    86 |
    87 |
    88 |
    89 |
    90 |
    91 |

    Undocumented

    92 | 93 | See more 94 |
    95 |
    96 |

    Declaration

    97 |
    98 |

    Swift

    99 |
    public protocol Hapticable : AnyObject
    100 | 101 |
    102 |
    103 |
    104 |
    105 |
  • 106 |
107 |
108 |
109 |
110 | 114 |
115 |
116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Haptica](https://raw.githubusercontent.com/efremidze/Haptica/master/Images/logo.png) 2 | 3 | [![CI](https://github.com/efremidze/Haptica/actions/workflows/ci.yml/badge.svg)](https://github.com/efremidze/Haptica/actions/workflows/ci.yml) 4 | [![CocoaPods](https://img.shields.io/cocoapods/v/Haptica.svg)](https://cocoapods.org/pods/Haptica) 5 | [![Carthage](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg)](https://github.com/Carthage/Carthage) 6 | [![SPM](https://img.shields.io/badge/SPM-compatible-brightgreen.svg)](https://swift.org/package-manager/) 7 | [![Swift](https://img.shields.io/badge/Swift-5.9+-orange.svg)](https://swift.org) 8 | [![License](https://img.shields.io/github/license/efremidze/Haptica.svg)](https://github.com/efremidze/Haptica/blob/master/LICENSE) 9 | 10 | # Haptica 11 | 12 | **Haptica** is a simple and expressive haptic feedback generator for iOS. 13 | 14 | ```bash 15 | $ pod try Haptica 16 | ``` 17 | 18 | --- 19 | 20 | ## 📱 Requirements 21 | 22 | | Haptica Version | iOS | Swift | Xcode | 23 | |-----------------|-----|-------|--------| 24 | | 4.x | 13+ | 5.x | 11+ | 25 | | 3.x | 9+ | 5.x | 8+ | 26 | | 2.x | 9+ | 4.x | 8+ | 27 | | 1.x | 9+ | 3.x | 8+ | 28 | 29 | ### Haptic Feedback Requirements 30 | 31 | - Device with a supported Taptic Engine 32 | - App running in the foreground 33 | - System Haptics setting enabled 34 | 35 | --- 36 | 37 | ## 🚀 Usage 38 | 39 | Trigger a haptic feedback with a single line: 40 | 41 | ```swift 42 | Haptic.impact(.light).generate() 43 | ``` 44 | 45 | ### Feedback Types 46 | 47 | - **Impact** (`.light`, `.medium`, `.heavy`, `.soft`, `.rigid`) 48 | Use to indicate collision or snap-to-position. 49 | - **Notification** (`.success`, `.warning`, `.error`) 50 | Use to communicate task results. 51 | - **Selection** 52 | Use for navigation through discrete values. 53 | 54 | ### Semantic Types (New) 55 | 56 | Use new expressive variants for common interactions: 57 | 58 | ```swift 59 | Haptic.success.generate() 60 | Haptic.warning.generate() 61 | Haptic.start.generate() 62 | Haptic.stop.generate() 63 | Haptic.increase.generate() 64 | Haptic.decrease.generate() 65 | ``` 66 | 67 | These semantic styles internally map to appropriate UIKit or Core Haptics-based effects. 68 | 69 | ### Custom Vibration Patterns 70 | 71 | ```swift 72 | Haptic.play("..oO-Oo..", delay: 0.1) 73 | ``` 74 | 75 | | Symbol | Feedback Type | 76 | |--------|-----------------| 77 | | `.` | Light impact | 78 | | `o` | Medium impact | 79 | | `O` | Heavy impact | 80 | | `x` | Soft impact | 81 | | `X` | Rigid impact | 82 | | `-` | 0.1s pause | 83 | 84 | Or use structured notes: 85 | 86 | ```swift 87 | Haptic.play([ 88 | .haptic(.impact(.light)), 89 | .haptic(.impact(.heavy)), 90 | .wait(0.1), 91 | .haptic(.impact(.heavy)), 92 | .haptic(.impact(.light)) 93 | ]) 94 | ``` 95 | 96 | ### 🔧 Core Haptics Support 97 | 98 | Haptica uses **Core Haptics** by default when available. To use the legacy API: 99 | 100 | ```swift 101 | Haptic.play(notes, legacy: true) 102 | ``` 103 | 104 | ### 📂 Play from Pattern File (New) - iOS 16+ 105 | 106 | Play a Core Haptics pattern from a bundled `.ahap` file: 107 | 108 | ```swift 109 | Haptic.playPattern(named: "Feedback") 110 | ``` 111 | 112 | Make sure the file is included in your app bundle and contains a valid haptic pattern. 113 | 114 | --- 115 | 116 | ## 🧹 UIButton Extension 117 | 118 | Enable haptics for buttons easily: 119 | 120 | ```swift 121 | button.isHaptic = true 122 | button.hapticType = .impact(.light) 123 | ``` 124 | 125 | Add or remove haptic feedback on control events: 126 | 127 | ```swift 128 | button.addHaptic(.selection, forControlEvents: .touchDown) 129 | button.removeHaptic(forControlEvents: .touchDown) 130 | ``` 131 | 132 | **API Summary:** 133 | 134 | ```swift 135 | var isHaptic: Bool 136 | var hapticType: Haptic? 137 | var hapticControlEvents: UIControl.Event? 138 | 139 | func addHaptic(_ haptic: Haptic, forControlEvents events: UIControl.Event) 140 | func removeHaptic(forControlEvents events: UIControl.Event) 141 | ``` 142 | 143 | --- 144 | 145 | ## 🔊 Sound Effects 146 | 147 | Integrate sound feedback with [Peep](https://github.com/efremidze/Peep): 148 | 149 | ```swift 150 | Peep.play(sound: KeyPress.tap) 151 | ``` 152 | 153 | --- 154 | 155 | ## 📦 Installation 156 | 157 | ### Swift Package Manager 158 | 159 | ```swift 160 | // For iOS 13+ 161 | .package(url: "https://github.com/efremidze/Haptica.git", from: "4.0.0") 162 | 163 | // For iOS 9 164 | .package(url: "https://github.com/efremidze/Haptica.git", from: "3.0.0") 165 | ``` 166 | 167 | ### CocoaPods 168 | 169 | ```ruby 170 | use_frameworks! 171 | pod "Haptica" 172 | ``` 173 | 174 | ### Carthage 175 | 176 | ```ruby 177 | github "efremidze/Haptica" 178 | ``` 179 | 180 | --- 181 | 182 | ## 💬 Communication 183 | 184 | - Found a bug? → [Open an issue](https://github.com/efremidze/Haptica/issues) 185 | - Have a feature request? → [Open an issue](https://github.com/efremidze/Haptica/issues) 186 | - Want to contribute? → Submit a pull request 187 | 188 | --- 189 | 190 | ## 📰 Mentions 191 | 192 | - [Fresh Swift](http://freshswift.net/post/-kj8ocn5j9lt_ljpffm4/) 193 | 194 | --- 195 | 196 | ## 📄 License 197 | 198 | Haptica is available under the MIT license. See the [LICENSE](./LICENSE) file for details. 199 | -------------------------------------------------------------------------------- /docs/Extensions/UIControl/Event.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Event Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

Event

72 |
73 |
74 |
struct Event : OptionSet
75 | 76 |
77 |
78 | 79 |
80 |
81 |
82 |
    83 |
  • 84 |
    85 | 86 | 87 | 88 | hashValue 89 | 90 |
    91 |
    92 |
    93 |
    94 |
    95 |
    96 | 97 |
    98 |
    99 |

    Declaration

    100 |
    101 |

    Swift

    102 |
    public var hashValue: Int { get }
    103 | 104 |
    105 |
    106 |
    107 |
    108 |
  • 109 |
110 |
111 |
112 |
113 | 117 |
118 |
119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /docs/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/Extensions/UIControl/Event.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Event Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

Event

72 |
73 |
74 |
struct Event : OptionSet
75 | 76 |
77 |
78 | 79 |
80 |
81 |
82 |
    83 |
  • 84 |
    85 | 86 | 87 | 88 | hashValue 89 | 90 |
    91 |
    92 |
    93 |
    94 |
    95 |
    96 | 97 |
    98 |
    99 |

    Declaration

    100 |
    101 |

    Swift

    102 |
    public var hashValue: Int { get }
    103 | 104 |
    105 |
    106 |
    107 |
    108 |
  • 109 |
110 |
111 |
112 |
113 | 117 |
118 |
119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/Extensions/UIControl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | UIControl Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

UIControl

72 | 73 |
74 |
75 |
76 |
    77 |
  • 78 |
    79 | 80 | 81 | 82 | Event 83 | 84 |
    85 |
    86 |
    87 |
    88 |
    89 |
    90 | 91 | See more 92 |
    93 |
    94 |

    Declaration

    95 |
    96 |

    Swift

    97 |
    struct Event : OptionSet
    98 | 99 |
    100 |
    101 |
    102 |
    103 |
  • 104 |
105 |
106 |
107 |
    108 |
  • 109 |
    110 | 111 | 112 | 113 | trigger(_:) 114 | 115 |
    116 |
    117 |
    118 |
    119 |
    120 |
    121 |

    Undocumented

    122 | 123 |
    124 |
    125 |

    Declaration

    126 |
    127 |

    Swift

    128 |
    @objc
    129 | public func trigger(_ sender: Any)
    130 | 131 |
    132 |
    133 |
    134 |
    135 |
  • 136 |
137 |
138 |
139 |
140 | 144 |
145 |
146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /docs/Enums/Note.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Note Enumeration Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

Note

72 |
73 |
74 |
public enum Note
75 | 76 |
77 |
78 |

Undocumented

79 | 80 |
81 |
82 |
83 |
    84 |
  • 85 |
    86 | 87 | 88 | 89 | haptic(_:) 90 | 91 |
    92 |
    93 |
    94 |
    95 |
    96 |
    97 |

    Undocumented

    98 | 99 |
    100 |
    101 |

    Declaration

    102 |
    103 |

    Swift

    104 |
    case haptic(Haptic)
    105 | 106 |
    107 |
    108 |
    109 |
    110 |
  • 111 |
  • 112 |
    113 | 114 | 115 | 116 | wait(_:) 117 | 118 |
    119 |
    120 |
    121 |
    122 |
    123 |
    124 |

    Undocumented

    125 | 126 |
    127 |
    128 |

    Declaration

    129 |
    130 |

    Swift

    131 |
    case wait(TimeInterval)
    132 | 133 |
    134 |
    135 |
    136 |
    137 |
  • 138 |
139 |
140 |
141 |
142 | 146 |
147 |
148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/Extensions/UIControl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | UIControl Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

UIControl

72 | 73 |
74 |
75 |
76 |
    77 |
  • 78 |
    79 | 80 | 81 | 82 | Event 83 | 84 |
    85 |
    86 |
    87 |
    88 |
    89 |
    90 | 91 | See more 92 |
    93 |
    94 |

    Declaration

    95 |
    96 |

    Swift

    97 |
    struct Event : OptionSet
    98 | 99 |
    100 |
    101 |
    102 |
    103 |
  • 104 |
105 |
106 |
107 |
    108 |
  • 109 |
    110 | 111 | 112 | 113 | trigger(_:) 114 | 115 |
    116 |
    117 |
    118 |
    119 |
    120 |
    121 |

    Undocumented

    122 | 123 |
    124 |
    125 |

    Declaration

    126 |
    127 |

    Swift

    128 |
    @objc
    129 | public func trigger(_ sender: Any)
    130 | 131 |
    132 |
    133 |
    134 |
    135 |
  • 136 |
137 |
138 |
139 |
140 | 144 |
145 |
146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/Enums/Note.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Note Enumeration Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

Note

72 |
73 |
74 |
public enum Note
75 | 76 |
77 |
78 |

Undocumented

79 | 80 |
81 |
82 |
83 |
    84 |
  • 85 |
    86 | 87 | 88 | 89 | haptic(_:) 90 | 91 |
    92 |
    93 |
    94 |
    95 |
    96 |
    97 |

    Undocumented

    98 | 99 |
    100 |
    101 |

    Declaration

    102 |
    103 |

    Swift

    104 |
    case haptic(Haptic)
    105 | 106 |
    107 |
    108 |
    109 |
    110 |
  • 111 |
  • 112 |
    113 | 114 | 115 | 116 | wait(_:) 117 | 118 |
    119 |
    120 |
    121 |
    122 |
    123 |
    124 |

    Undocumented

    125 | 126 |
    127 |
    128 |

    Declaration

    129 |
    130 |

    Swift

    131 |
    case wait(TimeInterval)
    132 | 133 |
    134 |
    135 |
    136 |
    137 |
  • 138 |
139 |
140 |
141 |
142 | 146 |
147 |
148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /docs/undocumented.json: -------------------------------------------------------------------------------- 1 | { 2 | "warnings": [ 3 | { 4 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 5 | "line": null, 6 | "symbol": "Haptic", 7 | "symbol_kind": "source.lang.swift.decl.extension", 8 | "warning": "undocumented" 9 | }, 10 | { 11 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 12 | "line": 11, 13 | "symbol": "HapticFeedbackStyle", 14 | "symbol_kind": "source.lang.swift.decl.enum", 15 | "warning": "undocumented" 16 | }, 17 | { 18 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 19 | "line": 12, 20 | "symbol": "HapticFeedbackStyle.heavy", 21 | "symbol_kind": "source.lang.swift.decl.enumelement", 22 | "warning": "undocumented" 23 | }, 24 | { 25 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 26 | "line": 12, 27 | "symbol": "HapticFeedbackStyle.light", 28 | "symbol_kind": "source.lang.swift.decl.enumelement", 29 | "warning": "undocumented" 30 | }, 31 | { 32 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 33 | "line": 12, 34 | "symbol": "HapticFeedbackStyle.medium", 35 | "symbol_kind": "source.lang.swift.decl.enumelement", 36 | "warning": "undocumented" 37 | }, 38 | { 39 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 40 | "line": 22, 41 | "symbol": "HapticFeedbackType", 42 | "symbol_kind": "source.lang.swift.decl.enum", 43 | "warning": "undocumented" 44 | }, 45 | { 46 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 47 | "line": 23, 48 | "symbol": "HapticFeedbackType.error", 49 | "symbol_kind": "source.lang.swift.decl.enumelement", 50 | "warning": "undocumented" 51 | }, 52 | { 53 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 54 | "line": 23, 55 | "symbol": "HapticFeedbackType.success", 56 | "symbol_kind": "source.lang.swift.decl.enumelement", 57 | "warning": "undocumented" 58 | }, 59 | { 60 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 61 | "line": 23, 62 | "symbol": "HapticFeedbackType.warning", 63 | "symbol_kind": "source.lang.swift.decl.enumelement", 64 | "warning": "undocumented" 65 | }, 66 | { 67 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 68 | "line": 33, 69 | "symbol": "Haptic", 70 | "symbol_kind": "source.lang.swift.decl.enum", 71 | "warning": "undocumented" 72 | }, 73 | { 74 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 75 | "line": 34, 76 | "symbol": "Haptic.impact(_:)", 77 | "symbol_kind": "source.lang.swift.decl.enumelement", 78 | "warning": "undocumented" 79 | }, 80 | { 81 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 82 | "line": 35, 83 | "symbol": "Haptic.notification(_:)", 84 | "symbol_kind": "source.lang.swift.decl.enumelement", 85 | "warning": "undocumented" 86 | }, 87 | { 88 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 89 | "line": 36, 90 | "symbol": "Haptic.selection", 91 | "symbol_kind": "source.lang.swift.decl.enumelement", 92 | "warning": "undocumented" 93 | }, 94 | { 95 | "file": "/Users/home/Documents/Haptica/Sources/Haptic.swift", 96 | "line": 39, 97 | "symbol": "Haptic.generate()", 98 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 99 | "warning": "undocumented" 100 | }, 101 | { 102 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 103 | "line": null, 104 | "symbol": "Hapticable", 105 | "symbol_kind": "source.lang.swift.decl.extension", 106 | "warning": "undocumented" 107 | }, 108 | { 109 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 110 | "line": 15, 111 | "symbol": "Hapticable", 112 | "symbol_kind": "source.lang.swift.decl.protocol", 113 | "warning": "undocumented" 114 | }, 115 | { 116 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 117 | "line": 16, 118 | "symbol": "Hapticable.trigger(_:)", 119 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 120 | "warning": "undocumented" 121 | }, 122 | { 123 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 124 | "line": 21, 125 | "symbol": "Hapticable.isHaptic", 126 | "symbol_kind": "source.lang.swift.decl.var.instance", 127 | "warning": "undocumented" 128 | }, 129 | { 130 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 131 | "line": 35, 132 | "symbol": "Hapticable.hapticType", 133 | "symbol_kind": "source.lang.swift.decl.var.instance", 134 | "warning": "undocumented" 135 | }, 136 | { 137 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 138 | "line": 40, 139 | "symbol": "Hapticable.hapticControlEvents", 140 | "symbol_kind": "source.lang.swift.decl.var.instance", 141 | "warning": "undocumented" 142 | }, 143 | { 144 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 145 | "line": 50, 146 | "symbol": "Hapticable.addHaptic(_:forControlEvents:)", 147 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 148 | "warning": "undocumented" 149 | }, 150 | { 151 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 152 | "line": 56, 153 | "symbol": "Hapticable.removeHaptic(forControlEvents:)", 154 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 155 | "warning": "undocumented" 156 | }, 157 | { 158 | "file": "/Users/home/Documents/Haptica/Sources/Hapticable.swift", 159 | "line": 65, 160 | "symbol": "UIControl.trigger(_:)", 161 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 162 | "warning": "undocumented" 163 | }, 164 | { 165 | "file": "/Users/home/Documents/Haptica/Sources/Pattern.swift", 166 | "line": 12, 167 | "symbol": "Haptic.queue", 168 | "symbol_kind": "source.lang.swift.decl.var.static", 169 | "warning": "undocumented" 170 | }, 171 | { 172 | "file": "/Users/home/Documents/Haptica/Sources/Pattern.swift", 173 | "line": 14, 174 | "symbol": "Haptic.play(_:)", 175 | "symbol_kind": "source.lang.swift.decl.function.method.static", 176 | "warning": "undocumented" 177 | }, 178 | { 179 | "file": "/Users/home/Documents/Haptica/Sources/Pattern.swift", 180 | "line": 26, 181 | "symbol": "Haptic.play(_:delay:)", 182 | "symbol_kind": "source.lang.swift.decl.function.method.static", 183 | "warning": "undocumented" 184 | }, 185 | { 186 | "file": "/Users/home/Documents/Haptica/Sources/Pattern.swift", 187 | "line": 32, 188 | "symbol": "Note", 189 | "symbol_kind": "source.lang.swift.decl.enum", 190 | "warning": "undocumented" 191 | }, 192 | { 193 | "file": "/Users/home/Documents/Haptica/Sources/Pattern.swift", 194 | "line": 33, 195 | "symbol": "Note.haptic(_:)", 196 | "symbol_kind": "source.lang.swift.decl.enumelement", 197 | "warning": "undocumented" 198 | }, 199 | { 200 | "file": "/Users/home/Documents/Haptica/Sources/Pattern.swift", 201 | "line": 34, 202 | "symbol": "Note.wait(_:)", 203 | "symbol_kind": "source.lang.swift.decl.enumelement", 204 | "warning": "undocumented" 205 | } 206 | ], 207 | "source_directory": "/Users/home/Documents/Haptica" 208 | } -------------------------------------------------------------------------------- /docs/Enums/HapticFeedbackStyle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | HapticFeedbackStyle Enumeration Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

HapticFeedbackStyle

72 |
73 |
74 |
public enum HapticFeedbackStyle : Int
75 | 76 |
77 |
78 |

Undocumented

79 | 80 |
81 |
82 |
83 |
    84 |
  • 85 |
    86 | 87 | 88 | 89 | light 90 | 91 |
    92 |
    93 |
    94 |
    95 |
    96 |
    97 |

    Undocumented

    98 | 99 |
    100 |
    101 |

    Declaration

    102 |
    103 |

    Swift

    104 |
    case light
    105 | 106 |
    107 |
    108 |
    109 |
    110 |
  • 111 |
  • 112 |
    113 | 114 | 115 | 116 | medium 117 | 118 |
    119 |
    120 |
    121 |
    122 |
    123 |
    124 |

    Undocumented

    125 | 126 |
    127 |
    128 |

    Declaration

    129 |
    130 |

    Swift

    131 |
    case medium
    132 | 133 |
    134 |
    135 |
    136 |
    137 |
  • 138 |
  • 139 |
    140 | 141 | 142 | 143 | heavy 144 | 145 |
    146 |
    147 |
    148 |
    149 |
    150 |
    151 |

    Undocumented

    152 | 153 |
    154 |
    155 |

    Declaration

    156 |
    157 |

    Swift

    158 |
    case heavy
    159 | 160 |
    161 |
    162 |
    163 |
    164 |
  • 165 |
166 |
167 |
168 |
169 | 173 |
174 |
175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /docs/Enums/HapticFeedbackType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | HapticFeedbackType Enumeration Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

HapticFeedbackType

72 |
73 |
74 |
public enum HapticFeedbackType : Int
75 | 76 |
77 |
78 |

Undocumented

79 | 80 |
81 |
82 |
83 |
    84 |
  • 85 |
    86 | 87 | 88 | 89 | success 90 | 91 |
    92 |
    93 |
    94 |
    95 |
    96 |
    97 |

    Undocumented

    98 | 99 |
    100 |
    101 |

    Declaration

    102 |
    103 |

    Swift

    104 |
    case success
    105 | 106 |
    107 |
    108 |
    109 |
    110 |
  • 111 |
  • 112 |
    113 | 114 | 115 | 116 | warning 117 | 118 |
    119 |
    120 |
    121 |
    122 |
    123 |
    124 |

    Undocumented

    125 | 126 |
    127 |
    128 |

    Declaration

    129 |
    130 |

    Swift

    131 |
    case warning
    132 | 133 |
    134 |
    135 |
    136 |
    137 |
  • 138 |
  • 139 |
    140 | 141 | 142 | 143 | error 144 | 145 |
    146 |
    147 |
    148 |
    149 |
    150 |
    151 |

    Undocumented

    152 | 153 |
    154 |
    155 |

    Declaration

    156 |
    157 |

    Swift

    158 |
    case error
    159 | 160 |
    161 |
    162 |
    163 |
    164 |
  • 165 |
166 |
167 |
168 |
169 | 173 |
174 |
175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/Enums/HapticFeedbackStyle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | HapticFeedbackStyle Enumeration Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

HapticFeedbackStyle

72 |
73 |
74 |
public enum HapticFeedbackStyle : Int
75 | 76 |
77 |
78 |

Undocumented

79 | 80 |
81 |
82 |
83 |
    84 |
  • 85 |
    86 | 87 | 88 | 89 | light 90 | 91 |
    92 |
    93 |
    94 |
    95 |
    96 |
    97 |

    Undocumented

    98 | 99 |
    100 |
    101 |

    Declaration

    102 |
    103 |

    Swift

    104 |
    case light
    105 | 106 |
    107 |
    108 |
    109 |
    110 |
  • 111 |
  • 112 |
    113 | 114 | 115 | 116 | medium 117 | 118 |
    119 |
    120 |
    121 |
    122 |
    123 |
    124 |

    Undocumented

    125 | 126 |
    127 |
    128 |

    Declaration

    129 |
    130 |

    Swift

    131 |
    case medium
    132 | 133 |
    134 |
    135 |
    136 |
    137 |
  • 138 |
  • 139 |
    140 | 141 | 142 | 143 | heavy 144 | 145 |
    146 |
    147 |
    148 |
    149 |
    150 |
    151 |

    Undocumented

    152 | 153 |
    154 |
    155 |

    Declaration

    156 |
    157 |

    Swift

    158 |
    case heavy
    159 | 160 |
    161 |
    162 |
    163 |
    164 |
  • 165 |
166 |
167 |
168 |
169 | 173 |
174 |
175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/Enums/HapticFeedbackType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | HapticFeedbackType Enumeration Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

HapticFeedbackType

72 |
73 |
74 |
public enum HapticFeedbackType : Int
75 | 76 |
77 |
78 |

Undocumented

79 | 80 |
81 |
82 |
83 |
    84 |
  • 85 |
    86 | 87 | 88 | 89 | success 90 | 91 |
    92 |
    93 |
    94 |
    95 |
    96 |
    97 |

    Undocumented

    98 | 99 |
    100 |
    101 |

    Declaration

    102 |
    103 |

    Swift

    104 |
    case success
    105 | 106 |
    107 |
    108 |
    109 |
    110 |
  • 111 |
  • 112 |
    113 | 114 | 115 | 116 | warning 117 | 118 |
    119 |
    120 |
    121 |
    122 |
    123 |
    124 |

    Undocumented

    125 | 126 |
    127 |
    128 |

    Declaration

    129 |
    130 |

    Swift

    131 |
    case warning
    132 | 133 |
    134 |
    135 |
    136 |
    137 |
  • 138 |
  • 139 |
    140 | 141 | 142 | 143 | error 144 | 145 |
    146 |
    147 |
    148 |
    149 |
    150 |
    151 |

    Undocumented

    152 | 153 |
    154 |
    155 |

    Declaration

    156 |
    157 |

    Swift

    158 |
    case error
    159 | 160 |
    161 |
    162 |
    163 |
    164 |
  • 165 |
166 |
167 |
168 |
169 | 173 |
174 |
175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /docs/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 60px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | 173 | .section { 174 | padding: 0 25px; } 175 | 176 | .highlight { 177 | background-color: #eee; 178 | padding: 10px 12px; 179 | border: 1px solid #e2e2e2; 180 | border-radius: 4px; 181 | overflow-x: auto; } 182 | 183 | .declaration .highlight { 184 | overflow-x: initial; 185 | padding: 0 40px 40px 0; 186 | margin-bottom: -25px; 187 | background-color: transparent; 188 | border: none; } 189 | 190 | .section-name { 191 | margin: 0; 192 | margin-left: 18px; } 193 | 194 | .task-group-section { 195 | padding-left: 6px; 196 | border-top: 1px solid #e2e2e2; } 197 | 198 | .task-group { 199 | padding-top: 0px; } 200 | 201 | .task-name-container a[name]:before { 202 | content: ""; 203 | display: block; 204 | padding-top: 70px; 205 | margin: -70px 0 0; } 206 | 207 | .item { 208 | padding-top: 8px; 209 | width: 100%; 210 | list-style-type: none; } 211 | .item a[name]:before { 212 | content: ""; 213 | display: block; 214 | padding-top: 70px; 215 | margin: -70px 0 0; } 216 | .item code { 217 | background-color: transparent; 218 | padding: 0; } 219 | .item .token { 220 | padding-left: 3px; 221 | margin-left: 15px; 222 | font-size: 11.9px; } 223 | .item .declaration-note { 224 | font-size: .85em; 225 | color: gray; 226 | font-style: italic; } 227 | 228 | .pointer-container { 229 | border-bottom: 1px solid #e2e2e2; 230 | left: -23px; 231 | padding-bottom: 13px; 232 | position: relative; 233 | width: 110%; } 234 | 235 | .pointer { 236 | background: #f9f9f9; 237 | border-left: 1px solid #e2e2e2; 238 | border-top: 1px solid #e2e2e2; 239 | height: 12px; 240 | left: 21px; 241 | top: -7px; 242 | -webkit-transform: rotate(45deg); 243 | -moz-transform: rotate(45deg); 244 | -o-transform: rotate(45deg); 245 | transform: rotate(45deg); 246 | position: absolute; 247 | width: 12px; } 248 | 249 | .height-container { 250 | display: none; 251 | left: -25px; 252 | padding: 0 25px; 253 | position: relative; 254 | width: 100%; 255 | overflow: hidden; } 256 | .height-container .section { 257 | background: #f9f9f9; 258 | border-bottom: 1px solid #e2e2e2; 259 | left: -25px; 260 | position: relative; 261 | width: 100%; 262 | padding-top: 10px; 263 | padding-bottom: 5px; } 264 | 265 | .aside, .language { 266 | padding: 6px 12px; 267 | margin: 12px 0; 268 | border-left: 5px solid #dddddd; 269 | overflow-y: hidden; } 270 | .aside .aside-title, .language .aside-title { 271 | font-size: 9px; 272 | letter-spacing: 2px; 273 | text-transform: uppercase; 274 | padding-bottom: 0; 275 | margin: 0; 276 | color: #aaa; 277 | -webkit-user-select: none; } 278 | .aside p:last-child, .language p:last-child { 279 | margin-bottom: 0; } 280 | 281 | .language { 282 | border-left: 5px solid #cde9f4; } 283 | .language .aside-title { 284 | color: #4b8afb; } 285 | 286 | .aside-warning { 287 | border-left: 5px solid #ff6666; } 288 | .aside-warning .aside-title { 289 | color: #ff0000; } 290 | 291 | .graybox { 292 | border-collapse: collapse; 293 | width: 100%; } 294 | .graybox p { 295 | margin: 0; 296 | word-break: break-word; 297 | min-width: 50px; } 298 | .graybox td { 299 | border: 1px solid #e2e2e2; 300 | padding: 5px 25px 5px 10px; 301 | vertical-align: middle; } 302 | .graybox tr td:first-of-type { 303 | text-align: right; 304 | padding: 7px; 305 | vertical-align: top; 306 | word-break: normal; 307 | width: 40px; } 308 | 309 | .slightly-smaller { 310 | font-size: 0.9em; } 311 | 312 | #footer { 313 | position: absolute; 314 | bottom: 10px; 315 | margin-left: 25px; } 316 | #footer p { 317 | margin: 0; 318 | color: #aaa; 319 | font-size: 0.8em; } 320 | 321 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 322 | display: none; } 323 | html.dash .main-content { 324 | width: 980px; 325 | margin-left: 0; 326 | border: none; 327 | width: 100%; 328 | top: 0; 329 | padding-bottom: 0; } 330 | html.dash .height-container { 331 | display: block; } 332 | html.dash .item .token { 333 | margin-left: 0; } 334 | html.dash .content-wrapper { 335 | width: auto; } 336 | html.dash #footer { 337 | position: static; } 338 | -------------------------------------------------------------------------------- /docs/docsets/Haptica.docset/Contents/Resources/Documents/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 60px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | 173 | .section { 174 | padding: 0 25px; } 175 | 176 | .highlight { 177 | background-color: #eee; 178 | padding: 10px 12px; 179 | border: 1px solid #e2e2e2; 180 | border-radius: 4px; 181 | overflow-x: auto; } 182 | 183 | .declaration .highlight { 184 | overflow-x: initial; 185 | padding: 0 40px 40px 0; 186 | margin-bottom: -25px; 187 | background-color: transparent; 188 | border: none; } 189 | 190 | .section-name { 191 | margin: 0; 192 | margin-left: 18px; } 193 | 194 | .task-group-section { 195 | padding-left: 6px; 196 | border-top: 1px solid #e2e2e2; } 197 | 198 | .task-group { 199 | padding-top: 0px; } 200 | 201 | .task-name-container a[name]:before { 202 | content: ""; 203 | display: block; 204 | padding-top: 70px; 205 | margin: -70px 0 0; } 206 | 207 | .item { 208 | padding-top: 8px; 209 | width: 100%; 210 | list-style-type: none; } 211 | .item a[name]:before { 212 | content: ""; 213 | display: block; 214 | padding-top: 70px; 215 | margin: -70px 0 0; } 216 | .item code { 217 | background-color: transparent; 218 | padding: 0; } 219 | .item .token { 220 | padding-left: 3px; 221 | margin-left: 15px; 222 | font-size: 11.9px; } 223 | .item .declaration-note { 224 | font-size: .85em; 225 | color: gray; 226 | font-style: italic; } 227 | 228 | .pointer-container { 229 | border-bottom: 1px solid #e2e2e2; 230 | left: -23px; 231 | padding-bottom: 13px; 232 | position: relative; 233 | width: 110%; } 234 | 235 | .pointer { 236 | background: #f9f9f9; 237 | border-left: 1px solid #e2e2e2; 238 | border-top: 1px solid #e2e2e2; 239 | height: 12px; 240 | left: 21px; 241 | top: -7px; 242 | -webkit-transform: rotate(45deg); 243 | -moz-transform: rotate(45deg); 244 | -o-transform: rotate(45deg); 245 | transform: rotate(45deg); 246 | position: absolute; 247 | width: 12px; } 248 | 249 | .height-container { 250 | display: none; 251 | left: -25px; 252 | padding: 0 25px; 253 | position: relative; 254 | width: 100%; 255 | overflow: hidden; } 256 | .height-container .section { 257 | background: #f9f9f9; 258 | border-bottom: 1px solid #e2e2e2; 259 | left: -25px; 260 | position: relative; 261 | width: 100%; 262 | padding-top: 10px; 263 | padding-bottom: 5px; } 264 | 265 | .aside, .language { 266 | padding: 6px 12px; 267 | margin: 12px 0; 268 | border-left: 5px solid #dddddd; 269 | overflow-y: hidden; } 270 | .aside .aside-title, .language .aside-title { 271 | font-size: 9px; 272 | letter-spacing: 2px; 273 | text-transform: uppercase; 274 | padding-bottom: 0; 275 | margin: 0; 276 | color: #aaa; 277 | -webkit-user-select: none; } 278 | .aside p:last-child, .language p:last-child { 279 | margin-bottom: 0; } 280 | 281 | .language { 282 | border-left: 5px solid #cde9f4; } 283 | .language .aside-title { 284 | color: #4b8afb; } 285 | 286 | .aside-warning { 287 | border-left: 5px solid #ff6666; } 288 | .aside-warning .aside-title { 289 | color: #ff0000; } 290 | 291 | .graybox { 292 | border-collapse: collapse; 293 | width: 100%; } 294 | .graybox p { 295 | margin: 0; 296 | word-break: break-word; 297 | min-width: 50px; } 298 | .graybox td { 299 | border: 1px solid #e2e2e2; 300 | padding: 5px 25px 5px 10px; 301 | vertical-align: middle; } 302 | .graybox tr td:first-of-type { 303 | text-align: right; 304 | padding: 7px; 305 | vertical-align: top; 306 | word-break: normal; 307 | width: 40px; } 308 | 309 | .slightly-smaller { 310 | font-size: 0.9em; } 311 | 312 | #footer { 313 | position: absolute; 314 | bottom: 10px; 315 | margin-left: 25px; } 316 | #footer p { 317 | margin: 0; 318 | color: #aaa; 319 | font-size: 0.8em; } 320 | 321 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 322 | display: none; } 323 | html.dash .main-content { 324 | width: 980px; 325 | margin-left: 0; 326 | border: none; 327 | width: 100%; 328 | top: 0; 329 | padding-bottom: 0; } 330 | html.dash .height-container { 331 | display: block; } 332 | html.dash .item .token { 333 | margin-left: 0; } 334 | html.dash .content-wrapper { 335 | width: auto; } 336 | html.dash #footer { 337 | position: static; } 338 | -------------------------------------------------------------------------------- /docs/Enums.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enumerations Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Haptica Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 68 |
69 |
70 |
71 |

Enumerations

72 |

The following enumerations are available globally.

73 | 74 |
75 |
76 |
77 |
    78 |
  • 79 |
    80 | 81 | 82 | 83 | HapticFeedbackStyle 84 | 85 |
    86 |
    87 |
    88 |
    89 |
    90 |
    91 |

    Undocumented

    92 | 93 | See more 94 |
    95 |
    96 |

    Declaration

    97 |
    98 |

    Swift

    99 |
    public enum HapticFeedbackStyle : Int
    100 | 101 |
    102 |
    103 |
    104 |
    105 |
  • 106 |
  • 107 |
    108 | 109 | 110 | 111 | HapticFeedbackType 112 | 113 |
    114 |
    115 |
    116 |
    117 |
    118 |
    119 |

    Undocumented

    120 | 121 | See more 122 |
    123 |
    124 |

    Declaration

    125 |
    126 |

    Swift

    127 |
    public enum HapticFeedbackType : Int
    128 | 129 |
    130 |
    131 |
    132 |
    133 |
  • 134 |
  • 135 |
    136 | 137 | 138 | 139 | Haptic 140 | 141 |
    142 |
    143 |
    144 |
    145 |
    146 |
    147 |

    Undocumented

    148 | 149 | See more 150 |
    151 |
    152 |

    Declaration

    153 |
    154 |

    Swift

    155 |
    public enum Haptic
    156 | 157 |
    158 |
    159 |
    160 |
    161 |
  • 162 |
163 |
164 |
165 |
    166 |
  • 167 |
    168 | 169 | 170 | 171 | Note 172 | 173 |
    174 |
    175 |
    176 |
    177 |
    178 |
    179 |

    Undocumented

    180 | 181 | See more 182 |
    183 |
    184 |

    Declaration

    185 |
    186 |

    Swift

    187 |
    public enum Note
    188 | 189 |
    190 |
    191 |
    192 |
    193 |
  • 194 |
195 |
196 |
197 |
198 | 202 |
203 |
204 | 205 | 206 | 207 | --------------------------------------------------------------------------------