├── .gitignore ├── LICENSE ├── MKToolTip-Example-Objc ├── MKToolTip-Example-Objc.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── MKToolTip-Example-Objc.xcscheme ├── MKToolTip-Example-Objc │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m └── MKToolTip-Example-ObjcTests │ ├── Info.plist │ └── MKToolTip_Example_ObjcTests.m ├── MKToolTip-Example ├── MKToolTip-Example.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── MKToolTip-Example.xcscheme ├── MKToolTip-Example │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift └── MKToolTip-ExampleTests │ ├── Info.plist │ └── MKToolTip_ExampleTests.swift ├── MKToolTip.gif ├── MKToolTip.podspec ├── MKToolTip.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── MKToolTip ├── MKToolTip.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── MKToolTip.xcscheme ├── MKToolTip │ ├── Extensions.swift │ ├── Info.plist │ ├── MKToolTip.h │ └── MKToolTip.swift └── MKToolTipTests │ ├── Info.plist │ └── MKToolTipTests.swift └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | ## OS X Finder 2 | .DS_Store 3 | 4 | ## Build generated 5 | build/ 6 | DerivedData 7 | 8 | ## Various settings 9 | *.pbxuser 10 | !default.pbxuser 11 | *.mode1v3 12 | !default.mode1v3 13 | *.mode2v3 14 | !default.mode2v3 15 | *.perspectivev3 16 | !default.perspectivev3 17 | xcuserdata 18 | 19 | ## Other 20 | *.xccheckout 21 | *.moved-aside 22 | *.xcuserstate 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | 29 | # Swift Package Manager 30 | .build/ 31 | 32 | # Carthage 33 | Carthage/Build -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Metin Kilicaslan 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 | 23 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B5360F2921633CC200E373AB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B5360F2821633CC200E373AB /* AppDelegate.m */; }; 11 | B5360F2C21633CC200E373AB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B5360F2B21633CC200E373AB /* ViewController.m */; }; 12 | B5360F2F21633CC200E373AB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5360F2D21633CC200E373AB /* Main.storyboard */; }; 13 | B5360F3121633CC300E373AB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B5360F3021633CC300E373AB /* Assets.xcassets */; }; 14 | B5360F3421633CC300E373AB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5360F3221633CC300E373AB /* LaunchScreen.storyboard */; }; 15 | B5360F3721633CC300E373AB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B5360F3621633CC300E373AB /* main.m */; }; 16 | B5360F4121633CC300E373AB /* MKToolTip_Example_ObjcTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B5360F4021633CC300E373AB /* MKToolTip_Example_ObjcTests.m */; }; 17 | B5360F4C21633CCF00E373AB /* MKToolTip.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5360F4B21633CCF00E373AB /* MKToolTip.framework */; }; 18 | B5360F4D21633CCF00E373AB /* MKToolTip.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B5360F4B21633CCF00E373AB /* MKToolTip.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | B5360F3D21633CC300E373AB /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = B5360F1C21633CC200E373AB /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = B5360F2321633CC200E373AB; 27 | remoteInfo = "MKToolTip-Example-Objc"; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXCopyFilesBuildPhase section */ 32 | B5360F4E21633CCF00E373AB /* Embed Frameworks */ = { 33 | isa = PBXCopyFilesBuildPhase; 34 | buildActionMask = 2147483647; 35 | dstPath = ""; 36 | dstSubfolderSpec = 10; 37 | files = ( 38 | B5360F4D21633CCF00E373AB /* MKToolTip.framework in Embed Frameworks */, 39 | ); 40 | name = "Embed Frameworks"; 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | /* End PBXCopyFilesBuildPhase section */ 44 | 45 | /* Begin PBXFileReference section */ 46 | B5360F2421633CC200E373AB /* MKToolTip-Example-Objc.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "MKToolTip-Example-Objc.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | B5360F2721633CC200E373AB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 48 | B5360F2821633CC200E373AB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 49 | B5360F2A21633CC200E373AB /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 50 | B5360F2B21633CC200E373AB /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 51 | B5360F2E21633CC200E373AB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 52 | B5360F3021633CC300E373AB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 53 | B5360F3321633CC300E373AB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 54 | B5360F3521633CC300E373AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | B5360F3621633CC300E373AB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 56 | B5360F3C21633CC300E373AB /* MKToolTip-Example-ObjcTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "MKToolTip-Example-ObjcTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | B5360F4021633CC300E373AB /* MKToolTip_Example_ObjcTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MKToolTip_Example_ObjcTests.m; sourceTree = ""; }; 58 | B5360F4221633CC300E373AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | B5360F4B21633CCF00E373AB /* MKToolTip.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MKToolTip.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | B5360F2121633CC200E373AB /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | B5360F4C21633CCF00E373AB /* MKToolTip.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | B5360F3921633CC300E373AB /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | /* End PBXFrameworksBuildPhase section */ 79 | 80 | /* Begin PBXGroup section */ 81 | B5360F1B21633CC200E373AB = { 82 | isa = PBXGroup; 83 | children = ( 84 | B5360F4B21633CCF00E373AB /* MKToolTip.framework */, 85 | B5360F2621633CC200E373AB /* MKToolTip-Example-Objc */, 86 | B5360F3F21633CC300E373AB /* MKToolTip-Example-ObjcTests */, 87 | B5360F2521633CC200E373AB /* Products */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | B5360F2521633CC200E373AB /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | B5360F2421633CC200E373AB /* MKToolTip-Example-Objc.app */, 95 | B5360F3C21633CC300E373AB /* MKToolTip-Example-ObjcTests.xctest */, 96 | ); 97 | name = Products; 98 | sourceTree = ""; 99 | }; 100 | B5360F2621633CC200E373AB /* MKToolTip-Example-Objc */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | B5360F2721633CC200E373AB /* AppDelegate.h */, 104 | B5360F2821633CC200E373AB /* AppDelegate.m */, 105 | B5360F2A21633CC200E373AB /* ViewController.h */, 106 | B5360F2B21633CC200E373AB /* ViewController.m */, 107 | B5360F2D21633CC200E373AB /* Main.storyboard */, 108 | B5360F3021633CC300E373AB /* Assets.xcassets */, 109 | B5360F3221633CC300E373AB /* LaunchScreen.storyboard */, 110 | B5360F3521633CC300E373AB /* Info.plist */, 111 | B5360F3621633CC300E373AB /* main.m */, 112 | ); 113 | path = "MKToolTip-Example-Objc"; 114 | sourceTree = ""; 115 | }; 116 | B5360F3F21633CC300E373AB /* MKToolTip-Example-ObjcTests */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | B5360F4021633CC300E373AB /* MKToolTip_Example_ObjcTests.m */, 120 | B5360F4221633CC300E373AB /* Info.plist */, 121 | ); 122 | path = "MKToolTip-Example-ObjcTests"; 123 | sourceTree = ""; 124 | }; 125 | /* End PBXGroup section */ 126 | 127 | /* Begin PBXNativeTarget section */ 128 | B5360F2321633CC200E373AB /* MKToolTip-Example-Objc */ = { 129 | isa = PBXNativeTarget; 130 | buildConfigurationList = B5360F4521633CC300E373AB /* Build configuration list for PBXNativeTarget "MKToolTip-Example-Objc" */; 131 | buildPhases = ( 132 | B5360F2021633CC200E373AB /* Sources */, 133 | B5360F2121633CC200E373AB /* Frameworks */, 134 | B5360F2221633CC200E373AB /* Resources */, 135 | B5360F4E21633CCF00E373AB /* Embed Frameworks */, 136 | ); 137 | buildRules = ( 138 | ); 139 | dependencies = ( 140 | ); 141 | name = "MKToolTip-Example-Objc"; 142 | productName = "MKToolTip-Example-Objc"; 143 | productReference = B5360F2421633CC200E373AB /* MKToolTip-Example-Objc.app */; 144 | productType = "com.apple.product-type.application"; 145 | }; 146 | B5360F3B21633CC300E373AB /* MKToolTip-Example-ObjcTests */ = { 147 | isa = PBXNativeTarget; 148 | buildConfigurationList = B5360F4821633CC300E373AB /* Build configuration list for PBXNativeTarget "MKToolTip-Example-ObjcTests" */; 149 | buildPhases = ( 150 | B5360F3821633CC300E373AB /* Sources */, 151 | B5360F3921633CC300E373AB /* Frameworks */, 152 | B5360F3A21633CC300E373AB /* Resources */, 153 | ); 154 | buildRules = ( 155 | ); 156 | dependencies = ( 157 | B5360F3E21633CC300E373AB /* PBXTargetDependency */, 158 | ); 159 | name = "MKToolTip-Example-ObjcTests"; 160 | productName = "MKToolTip-Example-ObjcTests"; 161 | productReference = B5360F3C21633CC300E373AB /* MKToolTip-Example-ObjcTests.xctest */; 162 | productType = "com.apple.product-type.bundle.unit-test"; 163 | }; 164 | /* End PBXNativeTarget section */ 165 | 166 | /* Begin PBXProject section */ 167 | B5360F1C21633CC200E373AB /* Project object */ = { 168 | isa = PBXProject; 169 | attributes = { 170 | LastUpgradeCheck = 1000; 171 | ORGANIZATIONNAME = "Metin Kilicaslan"; 172 | TargetAttributes = { 173 | B5360F2321633CC200E373AB = { 174 | CreatedOnToolsVersion = 10.0; 175 | }; 176 | B5360F3B21633CC300E373AB = { 177 | CreatedOnToolsVersion = 10.0; 178 | TestTargetID = B5360F2321633CC200E373AB; 179 | }; 180 | }; 181 | }; 182 | buildConfigurationList = B5360F1F21633CC200E373AB /* Build configuration list for PBXProject "MKToolTip-Example-Objc" */; 183 | compatibilityVersion = "Xcode 9.3"; 184 | developmentRegion = en; 185 | hasScannedForEncodings = 0; 186 | knownRegions = ( 187 | en, 188 | Base, 189 | ); 190 | mainGroup = B5360F1B21633CC200E373AB; 191 | productRefGroup = B5360F2521633CC200E373AB /* Products */; 192 | projectDirPath = ""; 193 | projectRoot = ""; 194 | targets = ( 195 | B5360F2321633CC200E373AB /* MKToolTip-Example-Objc */, 196 | B5360F3B21633CC300E373AB /* MKToolTip-Example-ObjcTests */, 197 | ); 198 | }; 199 | /* End PBXProject section */ 200 | 201 | /* Begin PBXResourcesBuildPhase section */ 202 | B5360F2221633CC200E373AB /* Resources */ = { 203 | isa = PBXResourcesBuildPhase; 204 | buildActionMask = 2147483647; 205 | files = ( 206 | B5360F3421633CC300E373AB /* LaunchScreen.storyboard in Resources */, 207 | B5360F3121633CC300E373AB /* Assets.xcassets in Resources */, 208 | B5360F2F21633CC200E373AB /* Main.storyboard in Resources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | B5360F3A21633CC300E373AB /* Resources */ = { 213 | isa = PBXResourcesBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | ); 217 | runOnlyForDeploymentPostprocessing = 0; 218 | }; 219 | /* End PBXResourcesBuildPhase section */ 220 | 221 | /* Begin PBXSourcesBuildPhase section */ 222 | B5360F2021633CC200E373AB /* Sources */ = { 223 | isa = PBXSourcesBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | B5360F2C21633CC200E373AB /* ViewController.m in Sources */, 227 | B5360F3721633CC300E373AB /* main.m in Sources */, 228 | B5360F2921633CC200E373AB /* AppDelegate.m in Sources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | B5360F3821633CC300E373AB /* Sources */ = { 233 | isa = PBXSourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | B5360F4121633CC300E373AB /* MKToolTip_Example_ObjcTests.m in Sources */, 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | /* End PBXSourcesBuildPhase section */ 241 | 242 | /* Begin PBXTargetDependency section */ 243 | B5360F3E21633CC300E373AB /* PBXTargetDependency */ = { 244 | isa = PBXTargetDependency; 245 | target = B5360F2321633CC200E373AB /* MKToolTip-Example-Objc */; 246 | targetProxy = B5360F3D21633CC300E373AB /* PBXContainerItemProxy */; 247 | }; 248 | /* End PBXTargetDependency section */ 249 | 250 | /* Begin PBXVariantGroup section */ 251 | B5360F2D21633CC200E373AB /* Main.storyboard */ = { 252 | isa = PBXVariantGroup; 253 | children = ( 254 | B5360F2E21633CC200E373AB /* Base */, 255 | ); 256 | name = Main.storyboard; 257 | sourceTree = ""; 258 | }; 259 | B5360F3221633CC300E373AB /* LaunchScreen.storyboard */ = { 260 | isa = PBXVariantGroup; 261 | children = ( 262 | B5360F3321633CC300E373AB /* Base */, 263 | ); 264 | name = LaunchScreen.storyboard; 265 | sourceTree = ""; 266 | }; 267 | /* End PBXVariantGroup section */ 268 | 269 | /* Begin XCBuildConfiguration section */ 270 | B5360F4321633CC300E373AB /* Debug */ = { 271 | isa = XCBuildConfiguration; 272 | buildSettings = { 273 | ALWAYS_SEARCH_USER_PATHS = NO; 274 | CLANG_ANALYZER_NONNULL = YES; 275 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 276 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 277 | CLANG_CXX_LIBRARY = "libc++"; 278 | CLANG_ENABLE_MODULES = YES; 279 | CLANG_ENABLE_OBJC_ARC = YES; 280 | CLANG_ENABLE_OBJC_WEAK = YES; 281 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 282 | CLANG_WARN_BOOL_CONVERSION = YES; 283 | CLANG_WARN_COMMA = YES; 284 | CLANG_WARN_CONSTANT_CONVERSION = YES; 285 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 286 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 287 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 288 | CLANG_WARN_EMPTY_BODY = YES; 289 | CLANG_WARN_ENUM_CONVERSION = YES; 290 | CLANG_WARN_INFINITE_RECURSION = YES; 291 | CLANG_WARN_INT_CONVERSION = YES; 292 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 293 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 294 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 295 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 296 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 297 | CLANG_WARN_STRICT_PROTOTYPES = YES; 298 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 299 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 300 | CLANG_WARN_UNREACHABLE_CODE = YES; 301 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 302 | CODE_SIGN_IDENTITY = "iPhone Developer"; 303 | COPY_PHASE_STRIP = NO; 304 | DEBUG_INFORMATION_FORMAT = dwarf; 305 | ENABLE_STRICT_OBJC_MSGSEND = YES; 306 | ENABLE_TESTABILITY = YES; 307 | GCC_C_LANGUAGE_STANDARD = gnu11; 308 | GCC_DYNAMIC_NO_PIC = NO; 309 | GCC_NO_COMMON_BLOCKS = YES; 310 | GCC_OPTIMIZATION_LEVEL = 0; 311 | GCC_PREPROCESSOR_DEFINITIONS = ( 312 | "DEBUG=1", 313 | "$(inherited)", 314 | ); 315 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 316 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 317 | GCC_WARN_UNDECLARED_SELECTOR = YES; 318 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 319 | GCC_WARN_UNUSED_FUNCTION = YES; 320 | GCC_WARN_UNUSED_VARIABLE = YES; 321 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 322 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 323 | MTL_FAST_MATH = YES; 324 | ONLY_ACTIVE_ARCH = YES; 325 | SDKROOT = iphoneos; 326 | }; 327 | name = Debug; 328 | }; 329 | B5360F4421633CC300E373AB /* Release */ = { 330 | isa = XCBuildConfiguration; 331 | buildSettings = { 332 | ALWAYS_SEARCH_USER_PATHS = NO; 333 | CLANG_ANALYZER_NONNULL = YES; 334 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 335 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 336 | CLANG_CXX_LIBRARY = "libc++"; 337 | CLANG_ENABLE_MODULES = YES; 338 | CLANG_ENABLE_OBJC_ARC = YES; 339 | CLANG_ENABLE_OBJC_WEAK = YES; 340 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 341 | CLANG_WARN_BOOL_CONVERSION = YES; 342 | CLANG_WARN_COMMA = YES; 343 | CLANG_WARN_CONSTANT_CONVERSION = YES; 344 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 345 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 346 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 356 | CLANG_WARN_STRICT_PROTOTYPES = YES; 357 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 358 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 359 | CLANG_WARN_UNREACHABLE_CODE = YES; 360 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 361 | CODE_SIGN_IDENTITY = "iPhone Developer"; 362 | COPY_PHASE_STRIP = NO; 363 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 364 | ENABLE_NS_ASSERTIONS = NO; 365 | ENABLE_STRICT_OBJC_MSGSEND = YES; 366 | GCC_C_LANGUAGE_STANDARD = gnu11; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 369 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 370 | GCC_WARN_UNDECLARED_SELECTOR = YES; 371 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 372 | GCC_WARN_UNUSED_FUNCTION = YES; 373 | GCC_WARN_UNUSED_VARIABLE = YES; 374 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 375 | MTL_ENABLE_DEBUG_INFO = NO; 376 | MTL_FAST_MATH = YES; 377 | SDKROOT = iphoneos; 378 | VALIDATE_PRODUCT = YES; 379 | }; 380 | name = Release; 381 | }; 382 | B5360F4621633CC300E373AB /* Debug */ = { 383 | isa = XCBuildConfiguration; 384 | buildSettings = { 385 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 386 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 387 | CODE_SIGN_STYLE = Automatic; 388 | DEVELOPMENT_TEAM = X5Q8UN75N5; 389 | INFOPLIST_FILE = "MKToolTip-Example-Objc/Info.plist"; 390 | LD_RUNPATH_SEARCH_PATHS = ( 391 | "$(inherited)", 392 | "@executable_path/Frameworks", 393 | ); 394 | PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-Example-Objc"; 395 | PRODUCT_NAME = "$(TARGET_NAME)"; 396 | TARGETED_DEVICE_FAMILY = "1,2"; 397 | }; 398 | name = Debug; 399 | }; 400 | B5360F4721633CC300E373AB /* Release */ = { 401 | isa = XCBuildConfiguration; 402 | buildSettings = { 403 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 404 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 405 | CODE_SIGN_STYLE = Automatic; 406 | DEVELOPMENT_TEAM = X5Q8UN75N5; 407 | INFOPLIST_FILE = "MKToolTip-Example-Objc/Info.plist"; 408 | LD_RUNPATH_SEARCH_PATHS = ( 409 | "$(inherited)", 410 | "@executable_path/Frameworks", 411 | ); 412 | PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-Example-Objc"; 413 | PRODUCT_NAME = "$(TARGET_NAME)"; 414 | TARGETED_DEVICE_FAMILY = "1,2"; 415 | }; 416 | name = Release; 417 | }; 418 | B5360F4921633CC300E373AB /* Debug */ = { 419 | isa = XCBuildConfiguration; 420 | buildSettings = { 421 | BUNDLE_LOADER = "$(TEST_HOST)"; 422 | CODE_SIGN_STYLE = Automatic; 423 | DEVELOPMENT_TEAM = X5Q8UN75N5; 424 | INFOPLIST_FILE = "MKToolTip-Example-ObjcTests/Info.plist"; 425 | LD_RUNPATH_SEARCH_PATHS = ( 426 | "$(inherited)", 427 | "@executable_path/Frameworks", 428 | "@loader_path/Frameworks", 429 | ); 430 | PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-Example-ObjcTests"; 431 | PRODUCT_NAME = "$(TARGET_NAME)"; 432 | TARGETED_DEVICE_FAMILY = "1,2"; 433 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MKToolTip-Example-Objc.app/MKToolTip-Example-Objc"; 434 | }; 435 | name = Debug; 436 | }; 437 | B5360F4A21633CC300E373AB /* Release */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | BUNDLE_LOADER = "$(TEST_HOST)"; 441 | CODE_SIGN_STYLE = Automatic; 442 | DEVELOPMENT_TEAM = X5Q8UN75N5; 443 | INFOPLIST_FILE = "MKToolTip-Example-ObjcTests/Info.plist"; 444 | LD_RUNPATH_SEARCH_PATHS = ( 445 | "$(inherited)", 446 | "@executable_path/Frameworks", 447 | "@loader_path/Frameworks", 448 | ); 449 | PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-Example-ObjcTests"; 450 | PRODUCT_NAME = "$(TARGET_NAME)"; 451 | TARGETED_DEVICE_FAMILY = "1,2"; 452 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MKToolTip-Example-Objc.app/MKToolTip-Example-Objc"; 453 | }; 454 | name = Release; 455 | }; 456 | /* End XCBuildConfiguration section */ 457 | 458 | /* Begin XCConfigurationList section */ 459 | B5360F1F21633CC200E373AB /* Build configuration list for PBXProject "MKToolTip-Example-Objc" */ = { 460 | isa = XCConfigurationList; 461 | buildConfigurations = ( 462 | B5360F4321633CC300E373AB /* Debug */, 463 | B5360F4421633CC300E373AB /* Release */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | B5360F4521633CC300E373AB /* Build configuration list for PBXNativeTarget "MKToolTip-Example-Objc" */ = { 469 | isa = XCConfigurationList; 470 | buildConfigurations = ( 471 | B5360F4621633CC300E373AB /* Debug */, 472 | B5360F4721633CC300E373AB /* Release */, 473 | ); 474 | defaultConfigurationIsVisible = 0; 475 | defaultConfigurationName = Release; 476 | }; 477 | B5360F4821633CC300E373AB /* Build configuration list for PBXNativeTarget "MKToolTip-Example-ObjcTests" */ = { 478 | isa = XCConfigurationList; 479 | buildConfigurations = ( 480 | B5360F4921633CC300E373AB /* Debug */, 481 | B5360F4A21633CC300E373AB /* Release */, 482 | ); 483 | defaultConfigurationIsVisible = 0; 484 | defaultConfigurationName = Release; 485 | }; 486 | /* End XCConfigurationList section */ 487 | }; 488 | rootObject = B5360F1C21633CC200E373AB /* Project object */; 489 | } 490 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc.xcodeproj/xcshareddata/xcschemes/MKToolTip-Example-Objc.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MKToolTip-Example-Objc 4 | // 5 | // Created by Metin Kılıçaslan on 2.10.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // MKToolTip-Example-Objc 4 | // 5 | // Created by Metin Kılıçaslan on 2.10.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc/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 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 27 | 34 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // MKToolTip-Example-Objc 4 | // 5 | // Created by Metin Kılıçaslan on 2.10.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // MKToolTip-Example-Objc 4 | // 5 | // Created by Metin Kılıçaslan on 2.10.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view, typically from a nib. 21 | } 22 | 23 | - (IBAction)barButton1Tapped:(UIBarButtonItem *)sender { 24 | [sender showToolTipWithIdentifier:@"" 25 | title:@"Pharetra" 26 | message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus." 27 | arrowPosition:ArrowPositionTop 28 | preferences:[[ToolTipPreferences alloc] init] 29 | delegate:nil]; 30 | } 31 | 32 | - (IBAction)button1Tapped:(UIButton *)sender { 33 | 34 | UIColor *gradientColor = [[UIColor alloc] initWithRed:0.886 green:0.922 blue:0.941 alpha:1.000]; 35 | UIColor *gradientColor2 = [[UIColor alloc] initWithRed:0.812 green:0.851 blue:0.875 alpha:1.000]; 36 | 37 | ToolTipPreferences *preferences = [[ToolTipPreferences alloc] init]; 38 | [[[preferences drawing] bubble] setGradientColors:@[ gradientColor, gradientColor2 ]]; 39 | [[[preferences drawing] arrow] setTipCornerRadius:0]; 40 | [[[preferences drawing] message] setColor:[UIColor blackColor]]; 41 | 42 | [sender showToolTipWithIdentifier:@"" 43 | title:nil 44 | message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus." 45 | arrowPosition:ArrowPositionLeft 46 | preferences:preferences 47 | delegate:nil]; 48 | } 49 | 50 | - (IBAction)button2Tapped:(UIButton *)sender { 51 | 52 | UIColor *gradientColor = [[UIColor alloc] initWithRed:0.165 green:0.322 blue:0.596 alpha:1.000]; 53 | UIColor *gradientColor2 = [[UIColor alloc] initWithRed:0.118 green:0.235 blue:0.447 alpha:1.000]; 54 | 55 | ToolTipPreferences *preferences = [[ToolTipPreferences alloc] init]; 56 | [[[preferences drawing] bubble] setGradientColors:@[ gradientColor, gradientColor2 ]]; 57 | 58 | [sender showToolTipWithIdentifier:@"" 59 | title:@"Dapibus" 60 | message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus." 61 | arrowPosition:ArrowPositionRight 62 | preferences:preferences 63 | delegate:nil]; 64 | } 65 | 66 | - (IBAction)button3Tapped:(UIButton *)sender { 67 | 68 | UIColor *gradientColor = [[UIColor alloc] initWithRed:0.988 green:0.714 blue:0.624 alpha:1.000]; 69 | UIColor *gradientColor2 = [[UIColor alloc] initWithRed:0.988 green:0.714 blue:0.624 alpha:1.000]; 70 | 71 | ToolTipPreferences *preferences = [[ToolTipPreferences alloc] init]; 72 | [[[preferences drawing] bubble] setGradientColors:@[ gradientColor, gradientColor2 ]]; 73 | 74 | 75 | [sender showToolTipWithIdentifier:@"" 76 | title:nil 77 | message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus." 78 | arrowPosition:ArrowPositionBottom 79 | preferences:preferences 80 | delegate:nil]; 81 | } 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-Objc/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MKToolTip-Example-Objc 4 | // 5 | // Created by Metin Kılıçaslan on 2.10.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-ObjcTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MKToolTip-Example-Objc/MKToolTip-Example-ObjcTests/MKToolTip_Example_ObjcTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MKToolTip_Example_ObjcTests.m 3 | // MKToolTip-Example-ObjcTests 4 | // 5 | // Created by Metin Kılıçaslan on 2.10.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MKToolTip_Example_ObjcTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation MKToolTip_Example_ObjcTests 16 | 17 | - (void)setUp { 18 | // Put setup code here. This method is called before the invocation of each test method in the class. 19 | } 20 | 21 | - (void)tearDown { 22 | // Put teardown code here. This method is called after the invocation of each test method in the class. 23 | } 24 | 25 | - (void)testExample { 26 | // This is an example of a functional test case. 27 | // Use XCTAssert and related functions to verify your tests produce the correct results. 28 | } 29 | 30 | - (void)testPerformanceExample { 31 | // This is an example of a performance test case. 32 | [self measureBlock:^{ 33 | // Put the code you want to measure the time of here. 34 | }]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /MKToolTip-Example/MKToolTip-Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B5BD28FC210B8F1C005682A9 /* MKToolTip.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5BD28FB210B8F1C005682A9 /* MKToolTip.framework */; }; 11 | B5BD28FD210B8F1C005682A9 /* MKToolTip.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B5BD28FB210B8F1C005682A9 /* MKToolTip.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 12 | B5CCDEF920FB5C7500855E09 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CCDEF820FB5C7500855E09 /* AppDelegate.swift */; }; 13 | B5CCDEFB20FB5C7500855E09 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CCDEFA20FB5C7500855E09 /* ViewController.swift */; }; 14 | B5CCDEFE20FB5C7500855E09 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5CCDEFC20FB5C7500855E09 /* Main.storyboard */; }; 15 | B5CCDF0020FB5C7600855E09 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B5CCDEFF20FB5C7600855E09 /* Assets.xcassets */; }; 16 | B5CCDF0320FB5C7600855E09 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5CCDF0120FB5C7600855E09 /* LaunchScreen.storyboard */; }; 17 | B5CCDF0E20FB5C7600855E09 /* MKToolTip_ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CCDF0D20FB5C7600855E09 /* MKToolTip_ExampleTests.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | B5CCDF0A20FB5C7600855E09 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = B5CCDEED20FB5C7500855E09 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = B5CCDEF420FB5C7500855E09; 26 | remoteInfo = "MKToolTip-Example"; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXCopyFilesBuildPhase section */ 31 | B5BD28FE210B8F1C005682A9 /* Embed Frameworks */ = { 32 | isa = PBXCopyFilesBuildPhase; 33 | buildActionMask = 2147483647; 34 | dstPath = ""; 35 | dstSubfolderSpec = 10; 36 | files = ( 37 | B5BD28FD210B8F1C005682A9 /* MKToolTip.framework in Embed Frameworks */, 38 | ); 39 | name = "Embed Frameworks"; 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXCopyFilesBuildPhase section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | B5BD28FB210B8F1C005682A9 /* MKToolTip.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MKToolTip.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | B5CCDEF520FB5C7500855E09 /* MKToolTip-Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "MKToolTip-Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | B5CCDEF820FB5C7500855E09 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 48 | B5CCDEFA20FB5C7500855E09 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 49 | B5CCDEFD20FB5C7500855E09 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 50 | B5CCDEFF20FB5C7600855E09 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 51 | B5CCDF0220FB5C7600855E09 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 52 | B5CCDF0420FB5C7600855E09 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | B5CCDF0920FB5C7600855E09 /* MKToolTip-ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "MKToolTip-ExampleTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | B5CCDF0D20FB5C7600855E09 /* MKToolTip_ExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MKToolTip_ExampleTests.swift; sourceTree = ""; }; 55 | B5CCDF0F20FB5C7600855E09 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | B5CCDEF220FB5C7500855E09 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | B5BD28FC210B8F1C005682A9 /* MKToolTip.framework in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | B5CCDF0620FB5C7600855E09 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | /* End PBXFrameworksBuildPhase section */ 75 | 76 | /* Begin PBXGroup section */ 77 | B5CCDEEC20FB5C7500855E09 = { 78 | isa = PBXGroup; 79 | children = ( 80 | B5BD28FB210B8F1C005682A9 /* MKToolTip.framework */, 81 | B5CCDEF720FB5C7500855E09 /* MKToolTip-Example */, 82 | B5CCDF0C20FB5C7600855E09 /* MKToolTip-ExampleTests */, 83 | B5CCDEF620FB5C7500855E09 /* Products */, 84 | ); 85 | sourceTree = ""; 86 | }; 87 | B5CCDEF620FB5C7500855E09 /* Products */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | B5CCDEF520FB5C7500855E09 /* MKToolTip-Example.app */, 91 | B5CCDF0920FB5C7600855E09 /* MKToolTip-ExampleTests.xctest */, 92 | ); 93 | name = Products; 94 | sourceTree = ""; 95 | }; 96 | B5CCDEF720FB5C7500855E09 /* MKToolTip-Example */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | B5CCDEF820FB5C7500855E09 /* AppDelegate.swift */, 100 | B5CCDEFA20FB5C7500855E09 /* ViewController.swift */, 101 | B5CCDEFC20FB5C7500855E09 /* Main.storyboard */, 102 | B5CCDEFF20FB5C7600855E09 /* Assets.xcassets */, 103 | B5CCDF0120FB5C7600855E09 /* LaunchScreen.storyboard */, 104 | B5CCDF0420FB5C7600855E09 /* Info.plist */, 105 | ); 106 | path = "MKToolTip-Example"; 107 | sourceTree = ""; 108 | }; 109 | B5CCDF0C20FB5C7600855E09 /* MKToolTip-ExampleTests */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | B5CCDF0D20FB5C7600855E09 /* MKToolTip_ExampleTests.swift */, 113 | B5CCDF0F20FB5C7600855E09 /* Info.plist */, 114 | ); 115 | path = "MKToolTip-ExampleTests"; 116 | sourceTree = ""; 117 | }; 118 | /* End PBXGroup section */ 119 | 120 | /* Begin PBXNativeTarget section */ 121 | B5CCDEF420FB5C7500855E09 /* MKToolTip-Example */ = { 122 | isa = PBXNativeTarget; 123 | buildConfigurationList = B5CCDF1220FB5C7600855E09 /* Build configuration list for PBXNativeTarget "MKToolTip-Example" */; 124 | buildPhases = ( 125 | B5CCDEF120FB5C7500855E09 /* Sources */, 126 | B5CCDEF220FB5C7500855E09 /* Frameworks */, 127 | B5CCDEF320FB5C7500855E09 /* Resources */, 128 | B5BD28FE210B8F1C005682A9 /* Embed Frameworks */, 129 | ); 130 | buildRules = ( 131 | ); 132 | dependencies = ( 133 | ); 134 | name = "MKToolTip-Example"; 135 | productName = "MKToolTip-Example"; 136 | productReference = B5CCDEF520FB5C7500855E09 /* MKToolTip-Example.app */; 137 | productType = "com.apple.product-type.application"; 138 | }; 139 | B5CCDF0820FB5C7600855E09 /* MKToolTip-ExampleTests */ = { 140 | isa = PBXNativeTarget; 141 | buildConfigurationList = B5CCDF1520FB5C7600855E09 /* Build configuration list for PBXNativeTarget "MKToolTip-ExampleTests" */; 142 | buildPhases = ( 143 | B5CCDF0520FB5C7600855E09 /* Sources */, 144 | B5CCDF0620FB5C7600855E09 /* Frameworks */, 145 | B5CCDF0720FB5C7600855E09 /* Resources */, 146 | ); 147 | buildRules = ( 148 | ); 149 | dependencies = ( 150 | B5CCDF0B20FB5C7600855E09 /* PBXTargetDependency */, 151 | ); 152 | name = "MKToolTip-ExampleTests"; 153 | productName = "MKToolTip-ExampleTests"; 154 | productReference = B5CCDF0920FB5C7600855E09 /* MKToolTip-ExampleTests.xctest */; 155 | productType = "com.apple.product-type.bundle.unit-test"; 156 | }; 157 | /* End PBXNativeTarget section */ 158 | 159 | /* Begin PBXProject section */ 160 | B5CCDEED20FB5C7500855E09 /* Project object */ = { 161 | isa = PBXProject; 162 | attributes = { 163 | LastSwiftUpdateCheck = 0940; 164 | LastUpgradeCheck = 0940; 165 | ORGANIZATIONNAME = "Metin Kilicaslan"; 166 | TargetAttributes = { 167 | B5CCDEF420FB5C7500855E09 = { 168 | CreatedOnToolsVersion = 9.4.1; 169 | }; 170 | B5CCDF0820FB5C7600855E09 = { 171 | CreatedOnToolsVersion = 9.4.1; 172 | TestTargetID = B5CCDEF420FB5C7500855E09; 173 | }; 174 | }; 175 | }; 176 | buildConfigurationList = B5CCDEF020FB5C7500855E09 /* Build configuration list for PBXProject "MKToolTip-Example" */; 177 | compatibilityVersion = "Xcode 9.3"; 178 | developmentRegion = en; 179 | hasScannedForEncodings = 0; 180 | knownRegions = ( 181 | en, 182 | Base, 183 | ); 184 | mainGroup = B5CCDEEC20FB5C7500855E09; 185 | productRefGroup = B5CCDEF620FB5C7500855E09 /* Products */; 186 | projectDirPath = ""; 187 | projectRoot = ""; 188 | targets = ( 189 | B5CCDEF420FB5C7500855E09 /* MKToolTip-Example */, 190 | B5CCDF0820FB5C7600855E09 /* MKToolTip-ExampleTests */, 191 | ); 192 | }; 193 | /* End PBXProject section */ 194 | 195 | /* Begin PBXResourcesBuildPhase section */ 196 | B5CCDEF320FB5C7500855E09 /* Resources */ = { 197 | isa = PBXResourcesBuildPhase; 198 | buildActionMask = 2147483647; 199 | files = ( 200 | B5CCDF0320FB5C7600855E09 /* LaunchScreen.storyboard in Resources */, 201 | B5CCDF0020FB5C7600855E09 /* Assets.xcassets in Resources */, 202 | B5CCDEFE20FB5C7500855E09 /* Main.storyboard in Resources */, 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | }; 206 | B5CCDF0720FB5C7600855E09 /* Resources */ = { 207 | isa = PBXResourcesBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | }; 213 | /* End PBXResourcesBuildPhase section */ 214 | 215 | /* Begin PBXSourcesBuildPhase section */ 216 | B5CCDEF120FB5C7500855E09 /* Sources */ = { 217 | isa = PBXSourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | B5CCDEFB20FB5C7500855E09 /* ViewController.swift in Sources */, 221 | B5CCDEF920FB5C7500855E09 /* AppDelegate.swift in Sources */, 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | B5CCDF0520FB5C7600855E09 /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | B5CCDF0E20FB5C7600855E09 /* MKToolTip_ExampleTests.swift in Sources */, 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | }; 233 | /* End PBXSourcesBuildPhase section */ 234 | 235 | /* Begin PBXTargetDependency section */ 236 | B5CCDF0B20FB5C7600855E09 /* PBXTargetDependency */ = { 237 | isa = PBXTargetDependency; 238 | target = B5CCDEF420FB5C7500855E09 /* MKToolTip-Example */; 239 | targetProxy = B5CCDF0A20FB5C7600855E09 /* PBXContainerItemProxy */; 240 | }; 241 | /* End PBXTargetDependency section */ 242 | 243 | /* Begin PBXVariantGroup section */ 244 | B5CCDEFC20FB5C7500855E09 /* Main.storyboard */ = { 245 | isa = PBXVariantGroup; 246 | children = ( 247 | B5CCDEFD20FB5C7500855E09 /* Base */, 248 | ); 249 | name = Main.storyboard; 250 | sourceTree = ""; 251 | }; 252 | B5CCDF0120FB5C7600855E09 /* LaunchScreen.storyboard */ = { 253 | isa = PBXVariantGroup; 254 | children = ( 255 | B5CCDF0220FB5C7600855E09 /* Base */, 256 | ); 257 | name = LaunchScreen.storyboard; 258 | sourceTree = ""; 259 | }; 260 | /* End PBXVariantGroup section */ 261 | 262 | /* Begin XCBuildConfiguration section */ 263 | B5CCDF1020FB5C7600855E09 /* Debug */ = { 264 | isa = XCBuildConfiguration; 265 | buildSettings = { 266 | ALWAYS_SEARCH_USER_PATHS = NO; 267 | CLANG_ANALYZER_NONNULL = YES; 268 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 269 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 270 | CLANG_CXX_LIBRARY = "libc++"; 271 | CLANG_ENABLE_MODULES = YES; 272 | CLANG_ENABLE_OBJC_ARC = YES; 273 | CLANG_ENABLE_OBJC_WEAK = YES; 274 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 275 | CLANG_WARN_BOOL_CONVERSION = YES; 276 | CLANG_WARN_COMMA = YES; 277 | CLANG_WARN_CONSTANT_CONVERSION = YES; 278 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 279 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 280 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 281 | CLANG_WARN_EMPTY_BODY = YES; 282 | CLANG_WARN_ENUM_CONVERSION = YES; 283 | CLANG_WARN_INFINITE_RECURSION = YES; 284 | CLANG_WARN_INT_CONVERSION = YES; 285 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 286 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 287 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 288 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 289 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 290 | CLANG_WARN_STRICT_PROTOTYPES = YES; 291 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 292 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 293 | CLANG_WARN_UNREACHABLE_CODE = YES; 294 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 295 | CODE_SIGN_IDENTITY = "iPhone Developer"; 296 | COPY_PHASE_STRIP = NO; 297 | DEBUG_INFORMATION_FORMAT = dwarf; 298 | ENABLE_STRICT_OBJC_MSGSEND = YES; 299 | ENABLE_TESTABILITY = YES; 300 | GCC_C_LANGUAGE_STANDARD = gnu11; 301 | GCC_DYNAMIC_NO_PIC = NO; 302 | GCC_NO_COMMON_BLOCKS = YES; 303 | GCC_OPTIMIZATION_LEVEL = 0; 304 | GCC_PREPROCESSOR_DEFINITIONS = ( 305 | "DEBUG=1", 306 | "$(inherited)", 307 | ); 308 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 309 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 310 | GCC_WARN_UNDECLARED_SELECTOR = YES; 311 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 312 | GCC_WARN_UNUSED_FUNCTION = YES; 313 | GCC_WARN_UNUSED_VARIABLE = YES; 314 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 315 | MTL_ENABLE_DEBUG_INFO = YES; 316 | ONLY_ACTIVE_ARCH = YES; 317 | SDKROOT = iphoneos; 318 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 319 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 320 | }; 321 | name = Debug; 322 | }; 323 | B5CCDF1120FB5C7600855E09 /* Release */ = { 324 | isa = XCBuildConfiguration; 325 | buildSettings = { 326 | ALWAYS_SEARCH_USER_PATHS = NO; 327 | CLANG_ANALYZER_NONNULL = YES; 328 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 329 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 330 | CLANG_CXX_LIBRARY = "libc++"; 331 | CLANG_ENABLE_MODULES = YES; 332 | CLANG_ENABLE_OBJC_ARC = YES; 333 | CLANG_ENABLE_OBJC_WEAK = YES; 334 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 335 | CLANG_WARN_BOOL_CONVERSION = YES; 336 | CLANG_WARN_COMMA = YES; 337 | CLANG_WARN_CONSTANT_CONVERSION = YES; 338 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 339 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 340 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 341 | CLANG_WARN_EMPTY_BODY = YES; 342 | CLANG_WARN_ENUM_CONVERSION = YES; 343 | CLANG_WARN_INFINITE_RECURSION = YES; 344 | CLANG_WARN_INT_CONVERSION = YES; 345 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 346 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 347 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 348 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 349 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 350 | CLANG_WARN_STRICT_PROTOTYPES = YES; 351 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 352 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 353 | CLANG_WARN_UNREACHABLE_CODE = YES; 354 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 355 | CODE_SIGN_IDENTITY = "iPhone Developer"; 356 | COPY_PHASE_STRIP = NO; 357 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 358 | ENABLE_NS_ASSERTIONS = NO; 359 | ENABLE_STRICT_OBJC_MSGSEND = YES; 360 | GCC_C_LANGUAGE_STANDARD = gnu11; 361 | GCC_NO_COMMON_BLOCKS = YES; 362 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 363 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 364 | GCC_WARN_UNDECLARED_SELECTOR = YES; 365 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 366 | GCC_WARN_UNUSED_FUNCTION = YES; 367 | GCC_WARN_UNUSED_VARIABLE = YES; 368 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 369 | MTL_ENABLE_DEBUG_INFO = NO; 370 | SDKROOT = iphoneos; 371 | SWIFT_COMPILATION_MODE = wholemodule; 372 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 373 | VALIDATE_PRODUCT = YES; 374 | }; 375 | name = Release; 376 | }; 377 | B5CCDF1320FB5C7600855E09 /* Debug */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 381 | CODE_SIGN_STYLE = Automatic; 382 | DEVELOPMENT_TEAM = X5Q8UN75N5; 383 | INFOPLIST_FILE = "MKToolTip-Example/Info.plist"; 384 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 385 | LD_RUNPATH_SEARCH_PATHS = ( 386 | "$(inherited)", 387 | "@executable_path/Frameworks", 388 | ); 389 | PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-Example"; 390 | PRODUCT_NAME = "$(TARGET_NAME)"; 391 | SWIFT_VERSION = 4.2; 392 | TARGETED_DEVICE_FAMILY = "1,2"; 393 | }; 394 | name = Debug; 395 | }; 396 | B5CCDF1420FB5C7600855E09 /* Release */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 400 | CODE_SIGN_STYLE = Automatic; 401 | DEVELOPMENT_TEAM = X5Q8UN75N5; 402 | INFOPLIST_FILE = "MKToolTip-Example/Info.plist"; 403 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 404 | LD_RUNPATH_SEARCH_PATHS = ( 405 | "$(inherited)", 406 | "@executable_path/Frameworks", 407 | ); 408 | PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-Example"; 409 | PRODUCT_NAME = "$(TARGET_NAME)"; 410 | SWIFT_VERSION = 4.2; 411 | TARGETED_DEVICE_FAMILY = "1,2"; 412 | }; 413 | name = Release; 414 | }; 415 | B5CCDF1620FB5C7600855E09 /* Debug */ = { 416 | isa = XCBuildConfiguration; 417 | buildSettings = { 418 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 419 | BUNDLE_LOADER = "$(TEST_HOST)"; 420 | CODE_SIGN_STYLE = Automatic; 421 | DEVELOPMENT_TEAM = X5Q8UN75N5; 422 | INFOPLIST_FILE = "MKToolTip-ExampleTests/Info.plist"; 423 | LD_RUNPATH_SEARCH_PATHS = ( 424 | "$(inherited)", 425 | "@executable_path/Frameworks", 426 | "@loader_path/Frameworks", 427 | ); 428 | PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-ExampleTests"; 429 | PRODUCT_NAME = "$(TARGET_NAME)"; 430 | SWIFT_VERSION = 4.2; 431 | TARGETED_DEVICE_FAMILY = "1,2"; 432 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MKToolTip-Example.app/MKToolTip-Example"; 433 | }; 434 | name = Debug; 435 | }; 436 | B5CCDF1720FB5C7600855E09 /* Release */ = { 437 | isa = XCBuildConfiguration; 438 | buildSettings = { 439 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 440 | BUNDLE_LOADER = "$(TEST_HOST)"; 441 | CODE_SIGN_STYLE = Automatic; 442 | DEVELOPMENT_TEAM = X5Q8UN75N5; 443 | INFOPLIST_FILE = "MKToolTip-ExampleTests/Info.plist"; 444 | LD_RUNPATH_SEARCH_PATHS = ( 445 | "$(inherited)", 446 | "@executable_path/Frameworks", 447 | "@loader_path/Frameworks", 448 | ); 449 | PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-ExampleTests"; 450 | PRODUCT_NAME = "$(TARGET_NAME)"; 451 | SWIFT_VERSION = 4.2; 452 | TARGETED_DEVICE_FAMILY = "1,2"; 453 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MKToolTip-Example.app/MKToolTip-Example"; 454 | }; 455 | name = Release; 456 | }; 457 | /* End XCBuildConfiguration section */ 458 | 459 | /* Begin XCConfigurationList section */ 460 | B5CCDEF020FB5C7500855E09 /* Build configuration list for PBXProject "MKToolTip-Example" */ = { 461 | isa = XCConfigurationList; 462 | buildConfigurations = ( 463 | B5CCDF1020FB5C7600855E09 /* Debug */, 464 | B5CCDF1120FB5C7600855E09 /* Release */, 465 | ); 466 | defaultConfigurationIsVisible = 0; 467 | defaultConfigurationName = Release; 468 | }; 469 | B5CCDF1220FB5C7600855E09 /* Build configuration list for PBXNativeTarget "MKToolTip-Example" */ = { 470 | isa = XCConfigurationList; 471 | buildConfigurations = ( 472 | B5CCDF1320FB5C7600855E09 /* Debug */, 473 | B5CCDF1420FB5C7600855E09 /* Release */, 474 | ); 475 | defaultConfigurationIsVisible = 0; 476 | defaultConfigurationName = Release; 477 | }; 478 | B5CCDF1520FB5C7600855E09 /* Build configuration list for PBXNativeTarget "MKToolTip-ExampleTests" */ = { 479 | isa = XCConfigurationList; 480 | buildConfigurations = ( 481 | B5CCDF1620FB5C7600855E09 /* Debug */, 482 | B5CCDF1720FB5C7600855E09 /* Release */, 483 | ); 484 | defaultConfigurationIsVisible = 0; 485 | defaultConfigurationName = Release; 486 | }; 487 | /* End XCConfigurationList section */ 488 | }; 489 | rootObject = B5CCDEED20FB5C7500855E09 /* Project object */; 490 | } 491 | -------------------------------------------------------------------------------- /MKToolTip-Example/MKToolTip-Example.xcodeproj/xcshareddata/xcschemes/MKToolTip-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /MKToolTip-Example/MKToolTip-Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // MKToolTip-Example 4 | // 5 | // Created by Metin Kilicaslan on 15.07.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /MKToolTip-Example/MKToolTip-Example/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /MKToolTip-Example/MKToolTip-Example/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /MKToolTip-Example/MKToolTip-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 | -------------------------------------------------------------------------------- /MKToolTip-Example/MKToolTip-Example/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 30 | 37 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /MKToolTip-Example/MKToolTip-Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /MKToolTip-Example/MKToolTip-Example/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // MKToolTip-Example 4 | // 5 | // Created by Metin Kilicaslan on 15.07.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import MKToolTip 11 | 12 | class ViewController: UIViewController { 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | // Do any additional setup after loading the view, typically from a nib. 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | 25 | @IBAction func barButton1Tapped(_ sender: UIBarButtonItem) { 26 | let preference = ToolTipPreferences() 27 | preference.drawing.bubble.color = UIColor(red: 0.937, green: 0.964, blue: 1.000, alpha: 1.000) 28 | preference.drawing.bubble.spacing = 10 29 | preference.drawing.bubble.cornerRadius = 5 30 | preference.drawing.bubble.inset = 15 31 | preference.drawing.bubble.border.color = UIColor(red: 0.768, green: 0.843, blue: 0.937, alpha: 1.000) 32 | preference.drawing.bubble.border.width = 1 33 | preference.drawing.arrow.tipCornerRadius = 5 34 | preference.drawing.message.color = UIColor(red: 0.200, green: 0.200, blue: 0.200, alpha: 1.000) 35 | preference.drawing.message.font = UIFont.systemFont(ofSize: 13, weight: .bold) 36 | preference.drawing.button.color = UIColor(red: 0.074, green: 0.231, blue: 0.431, alpha: 1.000) 37 | preference.drawing.button.font = UIFont.systemFont(ofSize: 13, weight: .bold) 38 | sender.showToolTip(identifier: "", message: "Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.", button: "JUSTO", arrowPosition: .top, preferences: preference, delegate: nil) 39 | } 40 | 41 | @IBAction func button1Tapped(_ sender: UIButton) { 42 | let gradientColor = UIColor(red: 0.886, green: 0.922, blue: 0.941, alpha: 1.000) 43 | let gradientColor2 = UIColor(red: 0.812, green: 0.851, blue: 0.875, alpha: 1.000) 44 | let preference = ToolTipPreferences() 45 | preference.drawing.bubble.gradientColors = [gradientColor, gradientColor2] 46 | preference.drawing.arrow.tipCornerRadius = 0 47 | preference.drawing.message.color = .black 48 | sender.showToolTip(identifier: "", message: "Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.", arrowPosition: .left, preferences: preference, delegate: nil) 49 | } 50 | 51 | @IBAction func button2Tapped(_ sender: UIButton) { 52 | let gradientColor = UIColor(red: 0.165, green: 0.322, blue: 0.596, alpha: 1.000) 53 | let gradientColor2 = UIColor(red: 0.118, green: 0.235, blue: 0.447, alpha: 1.000) 54 | let preference = ToolTipPreferences() 55 | preference.drawing.bubble.gradientColors = [gradientColor, gradientColor2] 56 | sender.showToolTip(identifier: "", title: "Dapibus", message: "Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.", arrowPosition: .right, preferences: preference, delegate: nil) 57 | } 58 | 59 | @IBAction func button3Tapped(_ sender: UIButton) { 60 | let gradientColor = UIColor(red: 0.988, green: 0.714, blue: 0.624, alpha: 1.000) 61 | let gradientColor2 = UIColor(red: 0.988, green: 0.714, blue: 0.624, alpha: 1.000) 62 | let preference = ToolTipPreferences() 63 | preference.drawing.bubble.gradientColors = [gradientColor, gradientColor2] 64 | sender.showToolTip(identifier: "", message: "Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.", arrowPosition: .bottom, preferences: preference, delegate: nil) 65 | } 66 | } 67 | 68 | -------------------------------------------------------------------------------- /MKToolTip-Example/MKToolTip-ExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MKToolTip-Example/MKToolTip-ExampleTests/MKToolTip_ExampleTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MKToolTip_ExampleTests.swift 3 | // MKToolTip-ExampleTests 4 | // 5 | // Created by Metin Kilicaslan on 15.07.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import MKToolTip_Example 11 | 12 | class MKToolTip_ExampleTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /MKToolTip.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/metinkilicaslan/MKToolTip/4a4b35fefbfbaab006f83c65219d81743c5ac251/MKToolTip.gif -------------------------------------------------------------------------------- /MKToolTip.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |spec| 2 | spec.name = "MKToolTip" 3 | spec.version = "1.0.6" 4 | spec.summary = "Simple tooltip view written in Swift." 5 | spec.description = "MKToolTip is a customizable tooltip view written in Swift that can be used as a informative tip." 6 | spec.homepage = "https://github.com/metinkilicaslan/MKToolTip" 7 | spec.license = { type: 'MIT', file: 'LICENSE' } 8 | spec.authors = { "Metin Kilicaslan" => 'metinkilicaslan@gmail.com' } 9 | 10 | spec.ios.deployment_target = "9.0" 11 | spec.swift_version = "4.2" 12 | spec.requires_arc = true 13 | spec.source = { :git => "https://github.com/metinkilicaslan/MKToolTip.git", :tag => "v#{spec.version}"} 14 | spec.source_files = "MKToolTip/MKToolTip/*.{h,swift}" 15 | end 16 | -------------------------------------------------------------------------------- /MKToolTip.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /MKToolTip.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MKToolTip/MKToolTip.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B5CCDEAB20FB45D600855E09 /* MKToolTip.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5CCDEA120FB45D600855E09 /* MKToolTip.framework */; }; 11 | B5CCDEB020FB45D600855E09 /* MKToolTipTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CCDEAF20FB45D600855E09 /* MKToolTipTests.swift */; }; 12 | B5CCDEB220FB45D600855E09 /* MKToolTip.h in Headers */ = {isa = PBXBuildFile; fileRef = B5CCDEA420FB45D600855E09 /* MKToolTip.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | B5CCDEE820FB467400855E09 /* MKToolTip.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CCDEE720FB467400855E09 /* MKToolTip.swift */; }; 14 | B5CCDEEA20FB468700855E09 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CCDEE920FB468700855E09 /* Extensions.swift */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXContainerItemProxy section */ 18 | B5CCDEAC20FB45D600855E09 /* PBXContainerItemProxy */ = { 19 | isa = PBXContainerItemProxy; 20 | containerPortal = B5CCDE9820FB45D600855E09 /* Project object */; 21 | proxyType = 1; 22 | remoteGlobalIDString = B5CCDEA020FB45D600855E09; 23 | remoteInfo = MKToolTip; 24 | }; 25 | /* End PBXContainerItemProxy section */ 26 | 27 | /* Begin PBXFileReference section */ 28 | B5CCDEA120FB45D600855E09 /* MKToolTip.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MKToolTip.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | B5CCDEA420FB45D600855E09 /* MKToolTip.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MKToolTip.h; sourceTree = ""; }; 30 | B5CCDEA520FB45D600855E09 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 31 | B5CCDEAA20FB45D600855E09 /* MKToolTipTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MKToolTipTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | B5CCDEAF20FB45D600855E09 /* MKToolTipTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MKToolTipTests.swift; sourceTree = ""; }; 33 | B5CCDEB120FB45D600855E09 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | B5CCDEE720FB467400855E09 /* MKToolTip.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MKToolTip.swift; sourceTree = ""; }; 35 | B5CCDEE920FB468700855E09 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | B5CCDE9D20FB45D600855E09 /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | B5CCDEA720FB45D600855E09 /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | B5CCDEAB20FB45D600855E09 /* MKToolTip.framework in Frameworks */, 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | /* End PBXFrameworksBuildPhase section */ 55 | 56 | /* Begin PBXGroup section */ 57 | B5CCDE9720FB45D600855E09 = { 58 | isa = PBXGroup; 59 | children = ( 60 | B5CCDEA320FB45D600855E09 /* MKToolTip */, 61 | B5CCDEAE20FB45D600855E09 /* MKToolTipTests */, 62 | B5CCDEA220FB45D600855E09 /* Products */, 63 | ); 64 | sourceTree = ""; 65 | }; 66 | B5CCDEA220FB45D600855E09 /* Products */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | B5CCDEA120FB45D600855E09 /* MKToolTip.framework */, 70 | B5CCDEAA20FB45D600855E09 /* MKToolTipTests.xctest */, 71 | ); 72 | name = Products; 73 | sourceTree = ""; 74 | }; 75 | B5CCDEA320FB45D600855E09 /* MKToolTip */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | B5CCDEA420FB45D600855E09 /* MKToolTip.h */, 79 | B5CCDEE720FB467400855E09 /* MKToolTip.swift */, 80 | B5CCDEE920FB468700855E09 /* Extensions.swift */, 81 | B5CCDEA520FB45D600855E09 /* Info.plist */, 82 | ); 83 | path = MKToolTip; 84 | sourceTree = ""; 85 | }; 86 | B5CCDEAE20FB45D600855E09 /* MKToolTipTests */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | B5CCDEAF20FB45D600855E09 /* MKToolTipTests.swift */, 90 | B5CCDEB120FB45D600855E09 /* Info.plist */, 91 | ); 92 | path = MKToolTipTests; 93 | sourceTree = ""; 94 | }; 95 | /* End PBXGroup section */ 96 | 97 | /* Begin PBXHeadersBuildPhase section */ 98 | B5CCDE9E20FB45D600855E09 /* Headers */ = { 99 | isa = PBXHeadersBuildPhase; 100 | buildActionMask = 2147483647; 101 | files = ( 102 | B5CCDEB220FB45D600855E09 /* MKToolTip.h in Headers */, 103 | ); 104 | runOnlyForDeploymentPostprocessing = 0; 105 | }; 106 | /* End PBXHeadersBuildPhase section */ 107 | 108 | /* Begin PBXNativeTarget section */ 109 | B5CCDEA020FB45D600855E09 /* MKToolTip */ = { 110 | isa = PBXNativeTarget; 111 | buildConfigurationList = B5CCDEB520FB45D600855E09 /* Build configuration list for PBXNativeTarget "MKToolTip" */; 112 | buildPhases = ( 113 | B5CCDE9C20FB45D600855E09 /* Sources */, 114 | B5CCDE9D20FB45D600855E09 /* Frameworks */, 115 | B5CCDE9E20FB45D600855E09 /* Headers */, 116 | B5CCDE9F20FB45D600855E09 /* Resources */, 117 | ); 118 | buildRules = ( 119 | ); 120 | dependencies = ( 121 | ); 122 | name = MKToolTip; 123 | productName = MKToolTip; 124 | productReference = B5CCDEA120FB45D600855E09 /* MKToolTip.framework */; 125 | productType = "com.apple.product-type.framework"; 126 | }; 127 | B5CCDEA920FB45D600855E09 /* MKToolTipTests */ = { 128 | isa = PBXNativeTarget; 129 | buildConfigurationList = B5CCDEB820FB45D600855E09 /* Build configuration list for PBXNativeTarget "MKToolTipTests" */; 130 | buildPhases = ( 131 | B5CCDEA620FB45D600855E09 /* Sources */, 132 | B5CCDEA720FB45D600855E09 /* Frameworks */, 133 | B5CCDEA820FB45D600855E09 /* Resources */, 134 | ); 135 | buildRules = ( 136 | ); 137 | dependencies = ( 138 | B5CCDEAD20FB45D600855E09 /* PBXTargetDependency */, 139 | ); 140 | name = MKToolTipTests; 141 | productName = MKToolTipTests; 142 | productReference = B5CCDEAA20FB45D600855E09 /* MKToolTipTests.xctest */; 143 | productType = "com.apple.product-type.bundle.unit-test"; 144 | }; 145 | /* End PBXNativeTarget section */ 146 | 147 | /* Begin PBXProject section */ 148 | B5CCDE9820FB45D600855E09 /* Project object */ = { 149 | isa = PBXProject; 150 | attributes = { 151 | LastSwiftUpdateCheck = 0940; 152 | LastUpgradeCheck = 0940; 153 | ORGANIZATIONNAME = "Metin Kilicaslan"; 154 | TargetAttributes = { 155 | B5CCDEA020FB45D600855E09 = { 156 | CreatedOnToolsVersion = 9.4.1; 157 | LastSwiftMigration = 0940; 158 | }; 159 | B5CCDEA920FB45D600855E09 = { 160 | CreatedOnToolsVersion = 9.4.1; 161 | }; 162 | }; 163 | }; 164 | buildConfigurationList = B5CCDE9B20FB45D600855E09 /* Build configuration list for PBXProject "MKToolTip" */; 165 | compatibilityVersion = "Xcode 9.3"; 166 | developmentRegion = en; 167 | hasScannedForEncodings = 0; 168 | knownRegions = ( 169 | en, 170 | ); 171 | mainGroup = B5CCDE9720FB45D600855E09; 172 | productRefGroup = B5CCDEA220FB45D600855E09 /* Products */; 173 | projectDirPath = ""; 174 | projectRoot = ""; 175 | targets = ( 176 | B5CCDEA020FB45D600855E09 /* MKToolTip */, 177 | B5CCDEA920FB45D600855E09 /* MKToolTipTests */, 178 | ); 179 | }; 180 | /* End PBXProject section */ 181 | 182 | /* Begin PBXResourcesBuildPhase section */ 183 | B5CCDE9F20FB45D600855E09 /* Resources */ = { 184 | isa = PBXResourcesBuildPhase; 185 | buildActionMask = 2147483647; 186 | files = ( 187 | ); 188 | runOnlyForDeploymentPostprocessing = 0; 189 | }; 190 | B5CCDEA820FB45D600855E09 /* Resources */ = { 191 | isa = PBXResourcesBuildPhase; 192 | buildActionMask = 2147483647; 193 | files = ( 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | }; 197 | /* End PBXResourcesBuildPhase section */ 198 | 199 | /* Begin PBXSourcesBuildPhase section */ 200 | B5CCDE9C20FB45D600855E09 /* Sources */ = { 201 | isa = PBXSourcesBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | B5CCDEE820FB467400855E09 /* MKToolTip.swift in Sources */, 205 | B5CCDEEA20FB468700855E09 /* Extensions.swift in Sources */, 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | }; 209 | B5CCDEA620FB45D600855E09 /* Sources */ = { 210 | isa = PBXSourcesBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | B5CCDEB020FB45D600855E09 /* MKToolTipTests.swift in Sources */, 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | }; 217 | /* End PBXSourcesBuildPhase section */ 218 | 219 | /* Begin PBXTargetDependency section */ 220 | B5CCDEAD20FB45D600855E09 /* PBXTargetDependency */ = { 221 | isa = PBXTargetDependency; 222 | target = B5CCDEA020FB45D600855E09 /* MKToolTip */; 223 | targetProxy = B5CCDEAC20FB45D600855E09 /* PBXContainerItemProxy */; 224 | }; 225 | /* End PBXTargetDependency section */ 226 | 227 | /* Begin XCBuildConfiguration section */ 228 | B5CCDEB320FB45D600855E09 /* Debug */ = { 229 | isa = XCBuildConfiguration; 230 | buildSettings = { 231 | ALWAYS_SEARCH_USER_PATHS = NO; 232 | CLANG_ANALYZER_NONNULL = YES; 233 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 234 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 235 | CLANG_CXX_LIBRARY = "libc++"; 236 | CLANG_ENABLE_MODULES = YES; 237 | CLANG_ENABLE_OBJC_ARC = YES; 238 | CLANG_ENABLE_OBJC_WEAK = YES; 239 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 240 | CLANG_WARN_BOOL_CONVERSION = YES; 241 | CLANG_WARN_COMMA = YES; 242 | CLANG_WARN_CONSTANT_CONVERSION = YES; 243 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 244 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 245 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 246 | CLANG_WARN_EMPTY_BODY = YES; 247 | CLANG_WARN_ENUM_CONVERSION = YES; 248 | CLANG_WARN_INFINITE_RECURSION = YES; 249 | CLANG_WARN_INT_CONVERSION = YES; 250 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 251 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 252 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 253 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 254 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 255 | CLANG_WARN_STRICT_PROTOTYPES = YES; 256 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 257 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 258 | CLANG_WARN_UNREACHABLE_CODE = YES; 259 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 260 | CODE_SIGN_IDENTITY = "iPhone Developer"; 261 | COPY_PHASE_STRIP = NO; 262 | CURRENT_PROJECT_VERSION = 1; 263 | DEBUG_INFORMATION_FORMAT = dwarf; 264 | ENABLE_STRICT_OBJC_MSGSEND = YES; 265 | ENABLE_TESTABILITY = YES; 266 | GCC_C_LANGUAGE_STANDARD = gnu11; 267 | GCC_DYNAMIC_NO_PIC = NO; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_OPTIMIZATION_LEVEL = 0; 270 | GCC_PREPROCESSOR_DEFINITIONS = ( 271 | "DEBUG=1", 272 | "$(inherited)", 273 | ); 274 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 275 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 276 | GCC_WARN_UNDECLARED_SELECTOR = YES; 277 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 278 | GCC_WARN_UNUSED_FUNCTION = YES; 279 | GCC_WARN_UNUSED_VARIABLE = YES; 280 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 281 | MTL_ENABLE_DEBUG_INFO = YES; 282 | ONLY_ACTIVE_ARCH = YES; 283 | SDKROOT = iphoneos; 284 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 285 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 286 | VERSIONING_SYSTEM = "apple-generic"; 287 | VERSION_INFO_PREFIX = ""; 288 | }; 289 | name = Debug; 290 | }; 291 | B5CCDEB420FB45D600855E09 /* Release */ = { 292 | isa = XCBuildConfiguration; 293 | buildSettings = { 294 | ALWAYS_SEARCH_USER_PATHS = NO; 295 | CLANG_ANALYZER_NONNULL = YES; 296 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 297 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 298 | CLANG_CXX_LIBRARY = "libc++"; 299 | CLANG_ENABLE_MODULES = YES; 300 | CLANG_ENABLE_OBJC_ARC = YES; 301 | CLANG_ENABLE_OBJC_WEAK = YES; 302 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 303 | CLANG_WARN_BOOL_CONVERSION = YES; 304 | CLANG_WARN_COMMA = YES; 305 | CLANG_WARN_CONSTANT_CONVERSION = YES; 306 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 307 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 308 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 309 | CLANG_WARN_EMPTY_BODY = YES; 310 | CLANG_WARN_ENUM_CONVERSION = YES; 311 | CLANG_WARN_INFINITE_RECURSION = YES; 312 | CLANG_WARN_INT_CONVERSION = YES; 313 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 314 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 315 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 316 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 317 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 318 | CLANG_WARN_STRICT_PROTOTYPES = YES; 319 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 320 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 321 | CLANG_WARN_UNREACHABLE_CODE = YES; 322 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 323 | CODE_SIGN_IDENTITY = "iPhone Developer"; 324 | COPY_PHASE_STRIP = NO; 325 | CURRENT_PROJECT_VERSION = 1; 326 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 327 | ENABLE_NS_ASSERTIONS = NO; 328 | ENABLE_STRICT_OBJC_MSGSEND = YES; 329 | GCC_C_LANGUAGE_STANDARD = gnu11; 330 | GCC_NO_COMMON_BLOCKS = YES; 331 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 332 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 333 | GCC_WARN_UNDECLARED_SELECTOR = YES; 334 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 335 | GCC_WARN_UNUSED_FUNCTION = YES; 336 | GCC_WARN_UNUSED_VARIABLE = YES; 337 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 338 | MTL_ENABLE_DEBUG_INFO = NO; 339 | SDKROOT = iphoneos; 340 | SWIFT_COMPILATION_MODE = wholemodule; 341 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 342 | VALIDATE_PRODUCT = YES; 343 | VERSIONING_SYSTEM = "apple-generic"; 344 | VERSION_INFO_PREFIX = ""; 345 | }; 346 | name = Release; 347 | }; 348 | B5CCDEB620FB45D600855E09 /* Debug */ = { 349 | isa = XCBuildConfiguration; 350 | buildSettings = { 351 | CLANG_ENABLE_MODULES = YES; 352 | CODE_SIGN_IDENTITY = ""; 353 | CODE_SIGN_STYLE = Automatic; 354 | DEFINES_MODULE = YES; 355 | DEVELOPMENT_TEAM = X5Q8UN75N5; 356 | DYLIB_COMPATIBILITY_VERSION = 1; 357 | DYLIB_CURRENT_VERSION = 1; 358 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 359 | INFOPLIST_FILE = MKToolTip/Info.plist; 360 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 361 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 362 | LD_RUNPATH_SEARCH_PATHS = ( 363 | "$(inherited)", 364 | "@executable_path/Frameworks", 365 | "@loader_path/Frameworks", 366 | ); 367 | PRODUCT_BUNDLE_IDENTIFIER = com.metinkilicaslan.MKToolTip; 368 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 369 | SKIP_INSTALL = YES; 370 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 371 | SWIFT_VERSION = 4.2; 372 | TARGETED_DEVICE_FAMILY = "1,2"; 373 | }; 374 | name = Debug; 375 | }; 376 | B5CCDEB720FB45D600855E09 /* Release */ = { 377 | isa = XCBuildConfiguration; 378 | buildSettings = { 379 | CLANG_ENABLE_MODULES = YES; 380 | CODE_SIGN_IDENTITY = ""; 381 | CODE_SIGN_STYLE = Automatic; 382 | DEFINES_MODULE = YES; 383 | DEVELOPMENT_TEAM = X5Q8UN75N5; 384 | DYLIB_COMPATIBILITY_VERSION = 1; 385 | DYLIB_CURRENT_VERSION = 1; 386 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 387 | INFOPLIST_FILE = MKToolTip/Info.plist; 388 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 389 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 390 | LD_RUNPATH_SEARCH_PATHS = ( 391 | "$(inherited)", 392 | "@executable_path/Frameworks", 393 | "@loader_path/Frameworks", 394 | ); 395 | PRODUCT_BUNDLE_IDENTIFIER = com.metinkilicaslan.MKToolTip; 396 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 397 | SKIP_INSTALL = YES; 398 | SWIFT_VERSION = 4.2; 399 | TARGETED_DEVICE_FAMILY = "1,2"; 400 | }; 401 | name = Release; 402 | }; 403 | B5CCDEB920FB45D600855E09 /* Debug */ = { 404 | isa = XCBuildConfiguration; 405 | buildSettings = { 406 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 407 | CODE_SIGN_STYLE = Automatic; 408 | DEVELOPMENT_TEAM = X5Q8UN75N5; 409 | INFOPLIST_FILE = MKToolTipTests/Info.plist; 410 | LD_RUNPATH_SEARCH_PATHS = ( 411 | "$(inherited)", 412 | "@executable_path/Frameworks", 413 | "@loader_path/Frameworks", 414 | ); 415 | PRODUCT_BUNDLE_IDENTIFIER = com.metinkilicaslan.MKToolTipTests; 416 | PRODUCT_NAME = "$(TARGET_NAME)"; 417 | SWIFT_VERSION = 4.0; 418 | TARGETED_DEVICE_FAMILY = "1,2"; 419 | }; 420 | name = Debug; 421 | }; 422 | B5CCDEBA20FB45D600855E09 /* Release */ = { 423 | isa = XCBuildConfiguration; 424 | buildSettings = { 425 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 426 | CODE_SIGN_STYLE = Automatic; 427 | DEVELOPMENT_TEAM = X5Q8UN75N5; 428 | INFOPLIST_FILE = MKToolTipTests/Info.plist; 429 | LD_RUNPATH_SEARCH_PATHS = ( 430 | "$(inherited)", 431 | "@executable_path/Frameworks", 432 | "@loader_path/Frameworks", 433 | ); 434 | PRODUCT_BUNDLE_IDENTIFIER = com.metinkilicaslan.MKToolTipTests; 435 | PRODUCT_NAME = "$(TARGET_NAME)"; 436 | SWIFT_VERSION = 4.0; 437 | TARGETED_DEVICE_FAMILY = "1,2"; 438 | }; 439 | name = Release; 440 | }; 441 | /* End XCBuildConfiguration section */ 442 | 443 | /* Begin XCConfigurationList section */ 444 | B5CCDE9B20FB45D600855E09 /* Build configuration list for PBXProject "MKToolTip" */ = { 445 | isa = XCConfigurationList; 446 | buildConfigurations = ( 447 | B5CCDEB320FB45D600855E09 /* Debug */, 448 | B5CCDEB420FB45D600855E09 /* Release */, 449 | ); 450 | defaultConfigurationIsVisible = 0; 451 | defaultConfigurationName = Release; 452 | }; 453 | B5CCDEB520FB45D600855E09 /* Build configuration list for PBXNativeTarget "MKToolTip" */ = { 454 | isa = XCConfigurationList; 455 | buildConfigurations = ( 456 | B5CCDEB620FB45D600855E09 /* Debug */, 457 | B5CCDEB720FB45D600855E09 /* Release */, 458 | ); 459 | defaultConfigurationIsVisible = 0; 460 | defaultConfigurationName = Release; 461 | }; 462 | B5CCDEB820FB45D600855E09 /* Build configuration list for PBXNativeTarget "MKToolTipTests" */ = { 463 | isa = XCConfigurationList; 464 | buildConfigurations = ( 465 | B5CCDEB920FB45D600855E09 /* Debug */, 466 | B5CCDEBA20FB45D600855E09 /* Release */, 467 | ); 468 | defaultConfigurationIsVisible = 0; 469 | defaultConfigurationName = Release; 470 | }; 471 | /* End XCConfigurationList section */ 472 | }; 473 | rootObject = B5CCDE9820FB45D600855E09 /* Project object */; 474 | } 475 | -------------------------------------------------------------------------------- /MKToolTip/MKToolTip.xcodeproj/xcshareddata/xcschemes/MKToolTip.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /MKToolTip/MKToolTip/Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Extensions.swift 3 | // MKToolTip 4 | // 5 | // Created by Metin Kilicaslan on 15.07.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | // MARK: CGRect extension 12 | 13 | extension CGRect { 14 | var x: CGFloat { 15 | get { 16 | return self.origin.x 17 | } 18 | set { 19 | self.origin.x = newValue 20 | } 21 | } 22 | 23 | var y: CGFloat { 24 | get { 25 | return self.origin.y 26 | } 27 | set { 28 | self.origin.y = newValue 29 | } 30 | } 31 | 32 | var center: CGPoint { 33 | return CGPoint(x: self.x + self.width / 2, y: self.y + self.height / 2) 34 | } 35 | } 36 | 37 | // MARK: CGPoint extension 38 | 39 | extension CGPoint { 40 | func distance(to point: CGPoint) -> CGFloat { 41 | let xDist = self.x - point.x 42 | let yDist = self.y - point.y 43 | return CGFloat(sqrt((xDist * xDist) + (yDist * yDist))) 44 | } 45 | 46 | func farCornerDistance() -> CGFloat { 47 | let bounds = UIScreen.main.bounds 48 | let leftTopCorner = CGPoint.zero 49 | let rightTopCorner = CGPoint(x: bounds.width, y: 0) 50 | let leftBottomCorner = CGPoint(x: 0, y: bounds.height) 51 | let rightBottomCorner = CGPoint(x: bounds.width, y: bounds.height) 52 | return max(distance(to: leftTopCorner), max(distance(to: rightTopCorner), max(distance(to: leftBottomCorner), distance(to: rightBottomCorner)))) 53 | } 54 | } 55 | 56 | // MARK: UIBarItem extension 57 | 58 | extension UIBarItem { 59 | var view: UIView? { 60 | if let item = self as? UIBarButtonItem, let customView = item.customView { 61 | return customView 62 | } 63 | return self.value(forKey: "view") as? UIView 64 | } 65 | } 66 | 67 | 68 | -------------------------------------------------------------------------------- /MKToolTip/MKToolTip/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /MKToolTip/MKToolTip/MKToolTip.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKToolTip.h 3 | // MKToolTip 4 | // 5 | // Created by Metin Kilicaslan on 15.07.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for MKToolTip. 12 | FOUNDATION_EXPORT double MKToolTipVersionNumber; 13 | 14 | //! Project version string for MKToolTip. 15 | FOUNDATION_EXPORT const unsigned char MKToolTipVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /MKToolTip/MKToolTip/MKToolTip.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MKToolTip.swift 3 | // 4 | // Copyright (c) 2018 Metin Kilicaslan 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | // SOFTWARE. 23 | 24 | import UIKit 25 | 26 | @objc public protocol MKToolTipDelegate: class { 27 | func toolTipViewDidAppear(for identifier: String) 28 | func toolTipViewDidDisappear(for identifier: String, with timeInterval: TimeInterval) 29 | } 30 | 31 | // MARK: Public methods extensions 32 | 33 | public extension UIView { 34 | 35 | @objc public func showToolTip(identifier: String, title: String? = nil, message: String, button: String? = nil, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) { 36 | let tooltip = MKToolTip(view: self, identifier: identifier, title: title, message: message, button: button, arrowPosition: arrowPosition, preferences: preferences, delegate: delegate) 37 | tooltip.calculateFrame() 38 | tooltip.show() 39 | } 40 | 41 | } 42 | 43 | public extension UIBarItem { 44 | 45 | @objc public func showToolTip(identifier: String, title: String? = nil, message: String, button: String? = nil, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) { 46 | if let view = self.view { 47 | view.showToolTip(identifier: identifier, title: title, message: message, button: button, arrowPosition: arrowPosition, preferences: preferences, delegate: delegate) 48 | } 49 | } 50 | 51 | } 52 | 53 | // MARK: Preferences 54 | 55 | @objc public class ToolTipPreferences: NSObject { 56 | 57 | @objc public class Drawing: NSObject { 58 | 59 | @objc public class Arrow: NSObject { 60 | @objc fileprivate var tip: CGPoint = .zero 61 | @objc public var size: CGSize = CGSize(width: 20, height: 10) 62 | @objc public var tipCornerRadius: CGFloat = 5 63 | } 64 | 65 | @objc public class Bubble: NSObject { 66 | @objc public class Border: NSObject { 67 | @objc public var color: UIColor? = nil 68 | @objc public var width: CGFloat = 1 69 | } 70 | 71 | @objc public var inset: CGFloat = 15 72 | @objc public var spacing: CGFloat = 5 73 | @objc public var cornerRadius: CGFloat = 5 74 | @objc public var maxWidth: CGFloat = 210 75 | @objc public var color: UIColor = UIColor.clear { 76 | didSet { 77 | gradientColors = [color] 78 | gradientLocations = [] 79 | } 80 | } 81 | @objc public var gradientLocations: [CGFloat] = [0.05, 1.0] 82 | @objc public var gradientColors: [UIColor] = [UIColor(red: 0.761, green: 0.914, blue: 0.984, alpha: 1.000), UIColor(red: 0.631, green: 0.769, blue: 0.992, alpha: 1.000)] 83 | @objc public var border: Border = Border() 84 | } 85 | 86 | @objc public class Title: NSObject { 87 | @objc public var font: UIFont = UIFont.systemFont(ofSize: 12, weight: .bold) 88 | @objc public var color: UIColor = .white 89 | } 90 | 91 | @objc public class Message: NSObject { 92 | @objc public var font: UIFont = UIFont.systemFont(ofSize: 12, weight: .regular) 93 | @objc public var color: UIColor = .white 94 | } 95 | 96 | @objc public class Button: NSObject { 97 | @objc public var font: UIFont = UIFont.systemFont(ofSize: 12, weight: .regular) 98 | @objc public var color: UIColor = .white 99 | } 100 | 101 | @objc public class Background: NSObject { 102 | @objc public var color: UIColor = UIColor.clear { 103 | didSet { 104 | gradientColors = [UIColor.clear, color] 105 | } 106 | } 107 | @objc fileprivate var gradientLocations: [CGFloat] = [0.05, 1.0] 108 | @objc fileprivate var gradientColors: [UIColor] = [UIColor.clear, UIColor.black.withAlphaComponent(0.4)] 109 | } 110 | 111 | @objc public var arrow: Arrow = Arrow() 112 | @objc public var bubble: Bubble = Bubble() 113 | @objc public var title: Title = Title() 114 | @objc public var message: Message = Message() 115 | @objc public var button: Button = Button() 116 | @objc public var background: Background = Background() 117 | } 118 | 119 | @objc public class Animating: NSObject { 120 | @objc public var dismissTransform: CGAffineTransform = CGAffineTransform(scaleX: 0.1, y: 0.1) 121 | @objc public var showInitialTransform: CGAffineTransform = CGAffineTransform(scaleX: 0, y: 0) 122 | @objc public var showFinalTransform: CGAffineTransform = .identity 123 | @objc public var springDamping: CGFloat = 0.7 124 | @objc public var springVelocity: CGFloat = 0.7 125 | @objc public var showInitialAlpha: CGFloat = 0 126 | @objc public var dismissFinalAlpha: CGFloat = 0 127 | @objc public var showDuration: TimeInterval = 0.7 128 | @objc public var dismissDuration: TimeInterval = 0.7 129 | } 130 | 131 | @objc public var drawing: Drawing = Drawing() 132 | @objc public var animating: Animating = Animating() 133 | 134 | @objc public override init() {} 135 | 136 | } 137 | 138 | // MARK: MKToolTip class implementation 139 | 140 | open class MKToolTip: UIView { 141 | 142 | @objc public enum ArrowPosition: Int { 143 | case top 144 | case right 145 | case bottom 146 | case left 147 | } 148 | 149 | // MARK: Variables 150 | 151 | private var arrowPosition: ArrowPosition = .top 152 | private var bubbleFrame: CGRect = .zero 153 | 154 | private var containerWindow: UIWindow? 155 | private unowned var presentingView: UIView 156 | 157 | private var identifier: String 158 | private var title: String? 159 | private var message: String 160 | private var button: String? 161 | 162 | private weak var delegate: MKToolTipDelegate? 163 | 164 | private var viewDidAppearDate: Date = Date() 165 | 166 | private var preferences: ToolTipPreferences 167 | 168 | // MARK: Lazy variables 169 | 170 | private lazy var gradient: CGGradient = { [unowned self] in 171 | let colors = self.preferences.drawing.bubble.gradientColors.map { $0.cgColor } as CFArray 172 | let locations = self.preferences.drawing.bubble.gradientLocations 173 | return CGGradient(colorsSpace: nil, colors: colors, locations: locations)! 174 | }() 175 | 176 | private lazy var titleSize: CGSize = { [unowned self] in 177 | var attributes = [NSAttributedString.Key.font : self.preferences.drawing.title.font] 178 | 179 | var textSize = CGSize.zero 180 | if self.title != nil { 181 | textSize = self.title!.boundingRect(with: CGSize(width: self.preferences.drawing.bubble.maxWidth - self.preferences.drawing.bubble.inset * 2, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size 182 | } 183 | 184 | textSize.width = ceil(textSize.width) 185 | textSize.height = ceil(textSize.height) 186 | 187 | return textSize 188 | }() 189 | 190 | private lazy var messageSize: CGSize = { [unowned self] in 191 | var attributes = [NSAttributedString.Key.font : self.preferences.drawing.message.font] 192 | 193 | var textSize = self.message.boundingRect(with: CGSize(width: self.preferences.drawing.bubble.maxWidth - self.preferences.drawing.bubble.inset * 2, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size 194 | 195 | textSize.width = ceil(textSize.width) 196 | textSize.height = ceil(textSize.height) 197 | 198 | return textSize 199 | }() 200 | 201 | private lazy var buttonSize: CGSize = { [unowned self] in 202 | var attributes = [NSAttributedString.Key.font : self.preferences.drawing.button.font] 203 | 204 | var textSize = CGSize.zero 205 | if self.button != nil { 206 | textSize = self.button!.boundingRect(with: CGSize(width: self.preferences.drawing.bubble.maxWidth - self.preferences.drawing.bubble.inset * 2, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size 207 | } 208 | 209 | textSize.width = ceil(textSize.width) 210 | textSize.height = ceil(textSize.height) 211 | 212 | return textSize 213 | }() 214 | 215 | private lazy var bubbleSize: CGSize = { [unowned self] in 216 | var height = self.preferences.drawing.bubble.inset 217 | 218 | if self.title != nil { 219 | height += self.titleSize.height + self.preferences.drawing.bubble.spacing 220 | } 221 | 222 | height += self.messageSize.height 223 | 224 | if self.button != nil { 225 | height += self.preferences.drawing.bubble.spacing + self.buttonSize.height 226 | } 227 | 228 | height += self.preferences.drawing.bubble.inset 229 | 230 | let widthInset = self.preferences.drawing.bubble.inset * 2 231 | let width = min(self.preferences.drawing.bubble.maxWidth, max(self.titleSize.width + widthInset, self.messageSize.width + widthInset)) 232 | return CGSize(width: width, height: height) 233 | }() 234 | 235 | private lazy var contentSize: CGSize = { [unowned self] in 236 | var height: CGFloat = 0 237 | var width: CGFloat = 0 238 | 239 | switch self.arrowPosition { 240 | case .top, .bottom: 241 | height = self.preferences.drawing.arrow.size.height + self.bubbleSize.height 242 | width = self.bubbleSize.width 243 | case .right, .left: 244 | height = self.bubbleSize.height 245 | width = self.preferences.drawing.arrow.size.height + self.bubbleSize.width 246 | } 247 | 248 | return CGSize(width: width, height: height) 249 | }() 250 | 251 | // MARK: Initializer 252 | 253 | init(view: UIView, identifier: String, title: String? = nil, message: String, button: String? = nil, arrowPosition: ArrowPosition, preferences: ToolTipPreferences, delegate: MKToolTipDelegate? = nil) { 254 | self.presentingView = view 255 | self.identifier = identifier 256 | self.title = title 257 | self.message = message 258 | self.button = button 259 | self.arrowPosition = arrowPosition 260 | self.preferences = preferences 261 | self.delegate = delegate 262 | super.init(frame: .zero) 263 | self.backgroundColor = .clear 264 | } 265 | 266 | @available(*, unavailable) 267 | required public init?(coder aDecoder: NSCoder) { 268 | fatalError("init(coder:) has not been implemented") 269 | } 270 | 271 | // MARK: Gesture methods 272 | 273 | @objc func handleTap() { 274 | dismissWithAnimation() 275 | } 276 | 277 | // MARK: Private methods 278 | 279 | fileprivate func calculateFrame() { 280 | let refViewFrame = presentingView.convert(presentingView.bounds, to: UIApplication.shared.keyWindow); 281 | 282 | var xOrigin: CGFloat = 0 283 | var yOrigin: CGFloat = 0 284 | 285 | let spacingForBorder: CGFloat = (preferences.drawing.bubble.border.color != nil) ? preferences.drawing.bubble.border.width : 0 286 | 287 | switch arrowPosition { 288 | case .top: 289 | xOrigin = refViewFrame.center.x - contentSize.width / 2 290 | yOrigin = refViewFrame.y + refViewFrame.height 291 | preferences.drawing.arrow.tip = CGPoint(x: refViewFrame.center.x - xOrigin, y: 0) 292 | bubbleFrame = CGRect(x: spacingForBorder, y: preferences.drawing.arrow.size.height + spacingForBorder, width: bubbleSize.width, height: bubbleSize.height) 293 | case .right: 294 | xOrigin = refViewFrame.x - contentSize.width 295 | yOrigin = refViewFrame.center.y - contentSize.height / 2 296 | preferences.drawing.arrow.tip = CGPoint(x: bubbleSize.width + preferences.drawing.arrow.size.height + spacingForBorder, y: refViewFrame.center.y - yOrigin) 297 | bubbleFrame = CGRect(x: spacingForBorder, y: spacingForBorder, width: bubbleSize.width, height: bubbleSize.height) 298 | case .bottom: 299 | xOrigin = refViewFrame.center.x - contentSize.width / 2 300 | yOrigin = refViewFrame.y - contentSize.height 301 | preferences.drawing.arrow.tip = CGPoint(x: refViewFrame.center.x - xOrigin, y: bubbleSize.height + preferences.drawing.arrow.size.height) 302 | bubbleFrame = CGRect(x: spacingForBorder, y: spacingForBorder, width: bubbleSize.width, height: bubbleSize.height) 303 | case .left: 304 | xOrigin = refViewFrame.x + refViewFrame.width 305 | yOrigin = refViewFrame.center.y - contentSize.height / 2 306 | preferences.drawing.arrow.tip = CGPoint(x: spacingForBorder, y: refViewFrame.center.y - yOrigin) 307 | bubbleFrame = CGRect(x: preferences.drawing.arrow.size.height + spacingForBorder, y: spacingForBorder, width: bubbleSize.width, height: bubbleSize.height) 308 | } 309 | 310 | let calculatedFrame = CGRect(x: xOrigin, y: yOrigin, width: contentSize.width + spacingForBorder * 2, height: contentSize.height + spacingForBorder * 2) 311 | frame = adjustFrame(calculatedFrame) 312 | } 313 | 314 | private func adjustFrame(_ frame: CGRect) -> CGRect { 315 | let bounds = UIScreen.main.bounds 316 | let restrictedBounds = CGRect(x: bounds.x + preferences.drawing.bubble.inset, y: bounds.y + preferences.drawing.bubble.inset, width: bounds.width - preferences.drawing.bubble.inset * 2, height: bounds.height - preferences.drawing.bubble.inset * 2) 317 | 318 | if !restrictedBounds.contains(frame) { 319 | var newFrame = frame 320 | 321 | if frame.x < restrictedBounds.x { 322 | let diff = -frame.x + preferences.drawing.bubble.inset 323 | newFrame.x = frame.x + diff 324 | if arrowPosition == .top || arrowPosition == .bottom { 325 | preferences.drawing.arrow.tip.x = max(preferences.drawing.arrow.size.width, preferences.drawing.arrow.tip.x - diff) 326 | } 327 | } 328 | 329 | if frame.x + frame.width > restrictedBounds.x + restrictedBounds.width { 330 | let diff = frame.x + frame.width - restrictedBounds.x - restrictedBounds.width 331 | newFrame.x = frame.x - diff 332 | if arrowPosition == .top || arrowPosition == .bottom { 333 | preferences.drawing.arrow.tip.x = min(newFrame.width - preferences.drawing.arrow.size.width, preferences.drawing.arrow.tip.x + diff) 334 | } 335 | } 336 | 337 | return newFrame 338 | } 339 | 340 | return frame 341 | } 342 | 343 | fileprivate func show() { 344 | let viewController = UIViewController() 345 | viewController.view.alpha = 0 346 | viewController.view.addSubview(self) 347 | 348 | createWindow(with: viewController) 349 | addTapGesture(for: viewController) 350 | showWithAnimation() 351 | } 352 | 353 | private func createWindow(with viewController: UIViewController) { 354 | self.containerWindow = UIWindow(frame: UIScreen.main.bounds) 355 | self.containerWindow!.rootViewController = viewController 356 | self.containerWindow!.windowLevel = UIWindow.Level.alert + 1; 357 | self.containerWindow!.makeKeyAndVisible() 358 | } 359 | 360 | private func addTapGesture(for viewController: UIViewController) { 361 | let tap = UITapGestureRecognizer(target: self, action: #selector(handleTap)) 362 | viewController.view.addGestureRecognizer(tap) 363 | } 364 | 365 | private func showWithAnimation() { 366 | transform = preferences.animating.showInitialTransform 367 | alpha = preferences.animating.showInitialAlpha 368 | 369 | UIView.animate(withDuration: preferences.animating.showDuration, delay: 0, usingSpringWithDamping: preferences.animating.springDamping, initialSpringVelocity: preferences.animating.springVelocity, options: [.curveEaseInOut], animations: { 370 | self.transform = self.preferences.animating.showFinalTransform 371 | self.alpha = 1 372 | self.containerWindow?.rootViewController?.view.alpha = 1 373 | }, completion: { (completed) in 374 | self.viewDidAppear() 375 | }) 376 | } 377 | 378 | private func dismissWithAnimation() { 379 | UIView.animate(withDuration: preferences.animating.dismissDuration, delay: 0, usingSpringWithDamping: preferences.animating.springDamping, initialSpringVelocity: preferences.animating.springVelocity, options: [.curveEaseInOut], animations: { 380 | self.transform = self.preferences.animating.dismissTransform 381 | self.alpha = self.preferences.animating.dismissFinalAlpha 382 | self.containerWindow?.rootViewController?.view.alpha = 0 383 | }) { (finished) -> Void in 384 | self.viewDidDisappear() 385 | self.removeFromSuperview() 386 | self.transform = CGAffineTransform.identity 387 | self.containerWindow?.resignKey() 388 | self.containerWindow = nil 389 | } 390 | } 391 | 392 | override open func draw(_ rect: CGRect) { 393 | let context = UIGraphicsGetCurrentContext()! 394 | drawBackgroundLayer() 395 | drawBubble(context) 396 | drawTexts(to: context) 397 | } 398 | 399 | private func viewDidAppear() { 400 | self.viewDidAppearDate = Date() 401 | self.delegate?.toolTipViewDidAppear(for: self.identifier) 402 | } 403 | 404 | private func viewDidDisappear() { 405 | let viewDidDisappearDate = Date() 406 | let timeInterval = viewDidDisappearDate.timeIntervalSince(self.viewDidAppearDate) 407 | self.delegate?.toolTipViewDidDisappear(for: self.identifier, with: timeInterval) 408 | } 409 | 410 | // MARK: Drawing methods 411 | 412 | private func drawBackgroundLayer() { 413 | if let view = self.containerWindow?.rootViewController?.view { 414 | let refViewFrame = presentingView.convert(presentingView.bounds, to: UIApplication.shared.keyWindow); 415 | let radius = refViewFrame.center.farCornerDistance() 416 | let frame = view.bounds 417 | let layer = RadialGradientBackgroundLayer(frame: frame, center: refViewFrame.center, radius: radius, locations: preferences.drawing.background.gradientLocations, colors: preferences.drawing.background.gradientColors) 418 | view.layer.insertSublayer(layer, at: 0) 419 | } 420 | } 421 | 422 | private func drawBubbleBorder(_ context: CGContext, path: CGMutablePath, borderColor: UIColor) { 423 | context.saveGState() 424 | context.addPath(path) 425 | context.setStrokeColor(borderColor.cgColor) 426 | context.setLineWidth(preferences.drawing.bubble.border.width) 427 | context.strokePath() 428 | context.restoreGState() 429 | } 430 | 431 | private func drawBubble(_ context: CGContext) { 432 | context.saveGState() 433 | let path = CGMutablePath() 434 | 435 | switch arrowPosition { 436 | case .top: 437 | let startingPoint = CGPoint(x: preferences.drawing.arrow.tip.x - preferences.drawing.arrow.size.width / 2, y: bubbleFrame.y) 438 | path.move(to: startingPoint) 439 | addTopArc(to: path) 440 | addLeftArc(to: path) 441 | addBottomArc(to: path) 442 | addRightArc(to: path) 443 | path.addLine(to: CGPoint(x: preferences.drawing.arrow.tip.x + preferences.drawing.arrow.size.width / 2, y: bubbleFrame.y)) 444 | addArrowTipArc(with: startingPoint, to: path) 445 | case .right: 446 | let startingPoint = CGPoint(x: preferences.drawing.arrow.tip.x - preferences.drawing.arrow.size.height, y: preferences.drawing.arrow.tip.y - preferences.drawing.arrow.size.width / 2) 447 | path.move(to: startingPoint) 448 | addRightArc(to: path) 449 | addTopArc(to: path) 450 | addLeftArc(to: path) 451 | addBottomArc(to: path) 452 | path.addLine(to: CGPoint(x: preferences.drawing.arrow.tip.x - preferences.drawing.arrow.size.height, y: preferences.drawing.arrow.tip.y + preferences.drawing.arrow.size.width / 2)) 453 | addArrowTipArc(with: startingPoint, to: path) 454 | case .bottom: 455 | let startingPoint = CGPoint(x: preferences.drawing.arrow.tip.x + preferences.drawing.arrow.size.width / 2, y: bubbleFrame.y + bubbleFrame.height) 456 | path.move(to: startingPoint) 457 | addBottomArc(to: path) 458 | addRightArc(to: path) 459 | addTopArc(to: path) 460 | addLeftArc(to: path) 461 | path.addLine(to: CGPoint(x: preferences.drawing.arrow.tip.x - preferences.drawing.arrow.size.width / 2, y: bubbleFrame.y + bubbleFrame.height)) 462 | addArrowTipArc(with: startingPoint, to: path) 463 | case .left: 464 | let startingPoint = CGPoint(x: preferences.drawing.arrow.tip.x + preferences.drawing.arrow.size.height, y: preferences.drawing.arrow.tip.y + preferences.drawing.arrow.size.width / 2) 465 | path.move(to: startingPoint) 466 | addLeftArc(to: path) 467 | addBottomArc(to: path) 468 | addRightArc(to: path) 469 | addTopArc(to: path) 470 | path.addLine(to: CGPoint(x: preferences.drawing.arrow.tip.x + preferences.drawing.arrow.size.height, y: preferences.drawing.arrow.tip.y - preferences.drawing.arrow.size.width / 2)) 471 | addArrowTipArc(with: startingPoint, to: path) 472 | } 473 | 474 | path.closeSubpath() 475 | 476 | context.addPath(path) 477 | context.clip() 478 | context.fillPath() 479 | context.drawLinearGradient(gradient, start: CGPoint.zero, end: CGPoint(x: 0, y: frame.height), options: []) 480 | context.restoreGState() 481 | 482 | if let borderColor = preferences.drawing.bubble.border.color { 483 | drawBubbleBorder(context, path: path, borderColor: borderColor) 484 | } 485 | } 486 | 487 | private func addTopArc(to path: CGMutablePath) { 488 | path.addArc(tangent1End: CGPoint(x: bubbleFrame.x, y: bubbleFrame.y), tangent2End: CGPoint(x: bubbleFrame.x, y: bubbleFrame.y + bubbleFrame.height), radius: preferences.drawing.bubble.cornerRadius) 489 | } 490 | 491 | private func addRightArc(to path: CGMutablePath) { 492 | path.addArc(tangent1End: CGPoint(x: bubbleFrame.x + bubbleFrame.width, y: bubbleFrame.y), tangent2End: CGPoint(x: bubbleFrame.x, y: bubbleFrame.y), radius: preferences.drawing.bubble.cornerRadius) 493 | } 494 | 495 | private func addBottomArc(to path: CGMutablePath) { 496 | path.addArc(tangent1End: CGPoint(x: bubbleFrame.x + bubbleFrame.width, y: bubbleFrame.y + bubbleFrame.height), tangent2End: CGPoint(x: bubbleFrame.x + bubbleFrame.width, y: bubbleFrame.y), radius: preferences.drawing.bubble.cornerRadius) 497 | } 498 | 499 | private func addLeftArc(to path: CGMutablePath) { 500 | path.addArc(tangent1End: CGPoint(x: bubbleFrame.x, y: bubbleFrame.y + bubbleFrame.height), tangent2End: CGPoint(x: bubbleFrame.x + bubbleFrame.width, y: bubbleFrame.y + bubbleFrame.height), radius: preferences.drawing.bubble.cornerRadius) 501 | } 502 | 503 | private func addArrowTipArc(with startingPoint: CGPoint, to path: CGMutablePath) { 504 | path.addArc(tangent1End: preferences.drawing.arrow.tip, tangent2End: startingPoint, radius: preferences.drawing.arrow.tipCornerRadius) 505 | } 506 | 507 | private func drawTexts(to context: CGContext) { 508 | context.saveGState() 509 | let paragraphStyle = NSMutableParagraphStyle() 510 | paragraphStyle.alignment = .left 511 | paragraphStyle.lineBreakMode = NSLineBreakMode.byWordWrapping 512 | 513 | let xOrigin = bubbleFrame.x + preferences.drawing.bubble.inset 514 | var yOrigin = bubbleFrame.y + preferences.drawing.bubble.inset 515 | 516 | if title != nil { 517 | let titleRect = CGRect(x: xOrigin, y: yOrigin, width: titleSize.width, height: titleSize.height) 518 | title!.draw(in: titleRect, withAttributes: [NSAttributedString.Key.font : preferences.drawing.title.font, NSAttributedString.Key.foregroundColor : preferences.drawing.title.color, NSAttributedString.Key.paragraphStyle : paragraphStyle]) 519 | 520 | yOrigin = titleRect.y + titleRect.height + preferences.drawing.bubble.spacing 521 | } 522 | 523 | let messageRect = CGRect(x: xOrigin, y: yOrigin, width: messageSize.width, height: messageSize.height) 524 | message.draw(in: messageRect, withAttributes: [NSAttributedString.Key.font : preferences.drawing.message.font, NSAttributedString.Key.foregroundColor : preferences.drawing.message.color, NSAttributedString.Key.paragraphStyle : paragraphStyle]) 525 | 526 | if button != nil { 527 | yOrigin += messageRect.height + preferences.drawing.bubble.spacing 528 | 529 | let buttonRect = CGRect(x: xOrigin, y: yOrigin, width: buttonSize.width, height: buttonSize.height) 530 | button!.draw(in: buttonRect, withAttributes: [NSAttributedString.Key.font : preferences.drawing.button.font, NSAttributedString.Key.foregroundColor : preferences.drawing.button.color, NSAttributedString.Key.paragraphStyle : paragraphStyle]) 531 | } 532 | 533 | } 534 | } 535 | 536 | // MARK: RadialGradientBackgroundLayer 537 | 538 | private class RadialGradientBackgroundLayer: CALayer { 539 | 540 | private var center: CGPoint = .zero 541 | private var radius: CGFloat = 0 542 | private var locations: [CGFloat] = [CGFloat]() 543 | private var colors: [UIColor] = [UIColor]() 544 | 545 | @available(*, unavailable) 546 | required override init(layer: Any) { 547 | super.init(layer: layer) 548 | } 549 | 550 | @available(*, unavailable) 551 | required init?(coder aDecoder: NSCoder) { 552 | fatalError("init(coder:) has not been implemented") 553 | } 554 | 555 | init(frame: CGRect, center: CGPoint, radius: CGFloat, locations: [CGFloat], colors: [UIColor]) { 556 | super.init() 557 | needsDisplayOnBoundsChange = true 558 | self.frame = frame 559 | self.center = center 560 | self.radius = radius 561 | self.locations = locations 562 | self.colors = colors 563 | } 564 | 565 | override func draw(in ctx: CGContext) { 566 | ctx.saveGState() 567 | let colorSpace = CGColorSpaceCreateDeviceRGB() 568 | let colors = self.colors.map { $0.cgColor } 569 | let gradient = CGGradient(colorsSpace: colorSpace, colors: colors as CFArray, locations: locations) 570 | ctx.drawRadialGradient(gradient!, startCenter: center, startRadius: 0, endCenter: center, endRadius: radius, options: []) 571 | ctx.restoreGState() 572 | } 573 | } 574 | 575 | -------------------------------------------------------------------------------- /MKToolTip/MKToolTipTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MKToolTip/MKToolTipTests/MKToolTipTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MKToolTipTests.swift 3 | // MKToolTipTests 4 | // 5 | // Created by Metin Kilicaslan on 15.07.2018. 6 | // Copyright © 2018 Metin Kilicaslan. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import MKToolTip 11 | 12 | class MKToolTipTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Languages](https://img.shields.io/badge/language-swift%204.2%20|%20objc-FF69B4.svg?style=plastic)](#)
2 | 3 | Description 4 | -------------- 5 | 6 | ```MKToolTip``` is a customizable tooltip view written in Swift that can be used as a informative tip inside your both Swift and Objective-C projects. 7 | 8 | 9 | 10 | Requirements 11 | ----------------------------- 12 | 13 | - iOS 9.0+ 14 | 15 | Installation 16 | -------------- 17 | 18 | ### CocoaPods 19 | 20 | To integrate MKToolTip into your Xcode project using CocoaPods, specify it in your `Podfile`: 21 | 22 | ```ruby 23 | pod 'MKToolTip' 24 | ``` 25 | 26 | Then, run the following command: 27 | 28 | ```bash 29 | $ pod install 30 | ``` 31 | 32 | ### Carthage 33 | 34 | To integrate MKToolTip into your Xcode project using Carthage, specify it in your `Cartfile`: 35 | 36 | ```ogdl 37 | github "metinkilicaslan/MKToolTip" 38 | ``` 39 | 40 | Run `carthage update` to build the framework and drag the built `MKToolTip.framework` into your Xcode project. 41 | 42 | ### Manually 43 | 44 | If you prefer not to use dependency managers, you can integrate MKToolTip into your project manually. 45 | 46 | Usage 47 | -------------- 48 | 49 | 1) First you should customize the preferences: 50 | 51 | ```swift 52 | let gradientColor = UIColor(red: 0.886, green: 0.922, blue: 0.941, alpha: 1.000) 53 | let gradientColor2 = UIColor(red: 0.812, green: 0.851, blue: 0.875, alpha: 1.000) 54 | let preference = ToolTipPreferences() 55 | preference.drawing.bubble.gradientColors = [gradientColor, gradientColor2] 56 | preference.drawing.arrow.tipCornerRadius = 0 57 | preference.drawing.message.color = .black 58 | ``` 59 | 60 | 2) Secondly call the ``showToolTip(identifier: title: message: arrowPosition: preferences: delegate:)`` method: 61 | 62 | ```swift 63 | let view = UIView() 64 | view.showToolTip(identifier: "identifier", title: "Dapibus", message: "Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.", arrowPosition: .top) 65 | ``` 66 | 67 | Public interface 68 | -------------- 69 | 70 | ### Delegate 71 | 72 | ```swift 73 | public protocol MKToolTipDelegate: class { 74 | func toolTipViewDidAppear(for identifier: String) 75 | func toolTipViewDidDisappear(for identifier: String, with timeInterval: TimeInterval) 76 | } 77 | ``` 78 | 79 | ### Public extension methods 80 | 81 | ```swift 82 | public extension UIView { 83 | public func showToolTip(identifier: String, title: String? = nil, message: String, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) 84 | } 85 | 86 | public extension UIBarItem { 87 | public func showToolTip(identifier: String, title: String? = nil, message: String, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) 88 | } 89 | ``` 90 | 91 | 92 | License 93 | -------------- 94 | 95 | MIT License, Copyright (c) 2018 Metin Kilicaslan, [@metinkilicaslan](https://twitter.com/metinkilicaslan) 96 | --------------------------------------------------------------------------------