Repository: yukiasai/Minamo Branch: master Commit: c6174adbb6d7 Files: 21 Total size: 47.1 KB Directory structure: gitextract_ems4_fcw/ ├── .gitignore ├── LICENSE ├── Minamo/ │ ├── Info.plist │ ├── Minamo.h │ └── RippleView.swift ├── Minamo.podspec ├── Minamo.xcodeproj/ │ ├── project.pbxproj │ └── project.xcworkspace/ │ └── contents.xcworkspacedata ├── MinamoExample/ │ ├── AppDelegate.swift │ ├── Assets.xcassets/ │ │ ├── AppIcon.appiconset/ │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── images/ │ │ ├── Contents.json │ │ ├── arrow.imageset/ │ │ │ └── Contents.json │ │ └── q.imageset/ │ │ └── Contents.json │ ├── Base.lproj/ │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── MinamoTests/ │ ├── Info.plist │ └── MinamoTests.swift └── README.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore ## Build generated build/ DerivedData ## Various settings *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata ## Other *.xccheckout *.moved-aside *.xcuserstate *.xcscmblueprint ## Obj-C/Swift specific *.hmap *.ipa # Swift Package Manager # # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. # Packages/ .build/ # CocoaPods # # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control Pods/ # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. # Carthage/Checkouts Carthage/Build # fastlane # # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md fastlane/report.xml fastlane/screenshots ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2016 yukiasai Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: Minamo/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType FMWK CFBundleShortVersionString 0.2.0 CFBundleSignature ???? CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass ================================================ FILE: Minamo/Minamo.h ================================================ // // Minamo.h // Minamo // // Created by yukiasai on 2016/02/03. // Copyright (c) 2016 yukiasai. All rights reserved. // #import //! Project version number for Minamo. FOUNDATION_EXPORT double MinamoVersionNumber; //! Project version string for Minamo. FOUNDATION_EXPORT const unsigned char MinamoVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import ================================================ FILE: Minamo/RippleView.swift ================================================ // // RippleView.swift // Minamo // // Created by yukiasai on 2016/01/21. // Copyright (c) 2016 yukiasai. All rights reserved. // import UIKit public protocol RippleViewDelegate: class { func rippleViewTapped(_ view: RippleView) } open class RippleView: UIView { static let defaultSize = CGSize(width: 24, height: 24) static let defaultRingWidth = CGFloat(3) open var delegate: RippleViewDelegate? open var size: CGSize = RippleView.defaultSize open var contentInset: CGFloat = 0 fileprivate var coreLayer = CAShapeLayer() open var ringScale: Float = 2 { didSet { restartAnimation() } } open var duration: TimeInterval = 1.5 { didSet { restartAnimation() } } open var coreImage: UIImage? { didSet { imageView.image = coreImage } } init() { super.init(frame: CGRect.zero) commonInit() } override init(frame: CGRect) { super.init(frame: frame) commonInit() } required public init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) commonInit() } fileprivate func commonInit() { tintColor = nil layer.addSublayer(ringLayer) layer.addSublayer(coreLayer) addSubview(imageView) isUserInteractionEnabled = false } open override func layoutSubviews() { super.layoutSubviews() coreLayer.frame = contentFrame coreLayer.path = UIBezierPath(ovalIn: coreLayer.bounds).cgPath ringLayer.frame = contentFrame ringLayer.path = UIBezierPath(ovalIn: ringLayer.bounds).cgPath imageView.frame = contentFrame } fileprivate var contentFrame: CGRect { return CGRect(x: contentInset, y: contentInset, width: bounds.width - contentInset * 2, height: bounds.height - contentInset * 2) } fileprivate lazy var ringLayer: CAShapeLayer = { let layer = CAShapeLayer() layer.lineWidth = RippleView.defaultRingWidth layer.fillColor = UIColor.clear.cgColor return layer }() open lazy var imageView: UIImageView = { let imageView = UIImageView(frame: self.contentFrame) imageView.contentMode = .center return imageView }() } extension RippleView { override open var isUserInteractionEnabled: Bool { get { return super.isUserInteractionEnabled } set { if newValue { addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(RippleView.viewTapped(_:)))) } else { gestureRecognizers?.forEach { removeGestureRecognizer($0) } } super.isUserInteractionEnabled = newValue } } override open var tintColor: UIColor! { get { return super.tintColor } set { super.tintColor = newValue ?? UIApplication.shared.keyWindow?.tintColor coreLayer.fillColor = tintColor.cgColor ringLayer.strokeColor = tintColor.cgColor } } public var coreHidden: Bool { get { return coreLayer.isHidden } set { coreLayer.isHidden = newValue } } public var ringHidden: Bool { get { return ringLayer.isHidden } set { ringLayer.isHidden = newValue } } public var ringWidth: CGFloat { get { return ringLayer.lineWidth } set { ringLayer.lineWidth = newValue } } } // MARK: Animation public extension RippleView { public func startAnimation() { ringLayer.removeAllAnimations() let scaleAnimation = { Void -> CAAnimation in let animation = CABasicAnimation(keyPath: "transform.scale") animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut) animation.fromValue = NSNumber(value: 1 as Float) animation.toValue = NSNumber(value: ringScale as Float) animation.duration = duration return animation }() let opacityAnimation = { Void -> CAAnimation in let animation = CABasicAnimation(keyPath: "opacity") animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut) animation.fromValue = NSNumber(value: 1 as Float) animation.toValue = NSNumber(value: 0 as Float) animation.duration = duration return animation }() let group = CAAnimationGroup() group.animations = [scaleAnimation, opacityAnimation] group.repeatCount = Float.infinity group.duration = duration ringLayer.add(group, forKey: "ring_animation") } public func restartAnimation() { if let animationCount = ringLayer.animationKeys()?.count, animationCount <= 0 { return } startAnimation() } } // MARK: Appear and Disappear public extension RippleView { public func appearAtView(_ view: UIView, offset: CGPoint = CGPoint.zero) { appearInView(view.superview, point: view.center + offset) } public func appearAtBarButtonItem(_ buttonItem: UIBarButtonItem, offset: CGPoint = CGPoint.zero) { guard let unmanagedView = buttonItem.perform(#selector(getter: UITouch.view)), let view = unmanagedView.takeUnretainedValue() as? UIView else { return } appearAtView(view, offset: offset) } public func appearInView(_ view: UIView?, point: CGPoint) { bounds = CGRect(origin: CGPoint.zero, size: size) center = point view?.addSubview(self) startAnimation() } public func disappear() { removeFromSuperview() } public var appeared: Bool { return superview != nil } } extension RippleView: UIGestureRecognizerDelegate { func viewTapped(_ gesture: UITapGestureRecognizer) { delegate?.rippleViewTapped(self) } } func +(l: CGPoint, r: CGPoint) -> CGPoint { return CGPoint(x: l.x + r.x, y: l.y + r.y) } ================================================ FILE: Minamo.podspec ================================================ Pod::Spec.new do |s| s.name = 'Minamo' s.version = '0.2.0' s.license = 'MIT' s.homepage = 'https://github.com/yukiasai/' s.summary = 'Simple coach mark library written in Swift' s.authors = { 'yukiasai' => 'yukiasai@gmail.com' } s.source = { :git => 'https://github.com/yukiasai/Minamo.git', :tag => s.version } s.ios.deployment_target = '8.0' s.source_files = 'Minamo/*.{h,swift}' end ================================================ FILE: Minamo.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 4622B5301C5111BF00DBE9E5 /* Minamo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4622B5251C5111BF00DBE9E5 /* Minamo.framework */; }; 46763FBB1C620107003F0E2C /* Minamo.h in Headers */ = {isa = PBXBuildFile; fileRef = 46763FBA1C620027003F0E2C /* Minamo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 46C6CDD01C55BD4600FB146D /* RippleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46C6CDCD1C55BD4600FB146D /* RippleView.swift */; }; 46C6CDDA1C55BD5100FB146D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46C6CDD21C55BD5100FB146D /* AppDelegate.swift */; }; 46C6CDDB1C55BD5100FB146D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 46C6CDD31C55BD5100FB146D /* Assets.xcassets */; }; 46C6CDDC1C55BD5100FB146D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 46C6CDD41C55BD5100FB146D /* LaunchScreen.storyboard */; }; 46C6CDDD1C55BD5100FB146D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 46C6CDD61C55BD5100FB146D /* Main.storyboard */; }; 46C6CDDF1C55BD5100FB146D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46C6CDD91C55BD5100FB146D /* ViewController.swift */; }; 46C6CDE31C55BD6200FB146D /* MinamoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46C6CDE11C55BD6200FB146D /* MinamoTests.swift */; }; 46C6CDE51C55BD6800FB146D /* RippleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46C6CDCD1C55BD4600FB146D /* RippleView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 4622B5311C5111BF00DBE9E5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 4622B51C1C5111BF00DBE9E5 /* Project object */; proxyType = 1; remoteGlobalIDString = 4622B5241C5111BF00DBE9E5; remoteInfo = Hamon; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 4622B5251C5111BF00DBE9E5 /* Minamo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Minamo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4622B52F1C5111BF00DBE9E5 /* Minamo.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Minamo.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 4622B5451C51160600DBE9E5 /* Minamo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Minamo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46763FBA1C620027003F0E2C /* Minamo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Minamo.h; sourceTree = ""; }; 46C6CDCC1C55BD4600FB146D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46C6CDCD1C55BD4600FB146D /* RippleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RippleView.swift; sourceTree = ""; }; 46C6CDD21C55BD5100FB146D /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 46C6CDD31C55BD5100FB146D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46C6CDD51C55BD5100FB146D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 46C6CDD71C55BD5100FB146D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46C6CDD81C55BD5100FB146D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46C6CDD91C55BD5100FB146D /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 46C6CDE11C55BD6200FB146D /* MinamoTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MinamoTests.swift; sourceTree = ""; }; 46C6CDE21C55BD6200FB146D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 4622B5211C5111BF00DBE9E5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 4622B52C1C5111BF00DBE9E5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 4622B5301C5111BF00DBE9E5 /* Minamo.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 4622B5421C51160600DBE9E5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 4622B51B1C5111BF00DBE9E5 = { isa = PBXGroup; children = ( 46C6CDCA1C55BD4600FB146D /* Minamo */, 46C6CDE01C55BD6200FB146D /* MinamoTests */, 46C6CDD11C55BD5100FB146D /* MinamoExample */, 4622B5261C5111BF00DBE9E5 /* Products */, ); sourceTree = ""; }; 4622B5261C5111BF00DBE9E5 /* Products */ = { isa = PBXGroup; children = ( 4622B5251C5111BF00DBE9E5 /* Minamo.framework */, 4622B52F1C5111BF00DBE9E5 /* Minamo.xctest */, 4622B5451C51160600DBE9E5 /* Minamo.app */, ); name = Products; sourceTree = ""; }; 46C6CDCA1C55BD4600FB146D /* Minamo */ = { isa = PBXGroup; children = ( 46763FBA1C620027003F0E2C /* Minamo.h */, 46C6CDCD1C55BD4600FB146D /* RippleView.swift */, 46C6CDCC1C55BD4600FB146D /* Info.plist */, ); path = Minamo; sourceTree = ""; }; 46C6CDD11C55BD5100FB146D /* MinamoExample */ = { isa = PBXGroup; children = ( 46C6CDD21C55BD5100FB146D /* AppDelegate.swift */, 46C6CDD31C55BD5100FB146D /* Assets.xcassets */, 46C6CDD41C55BD5100FB146D /* LaunchScreen.storyboard */, 46C6CDD61C55BD5100FB146D /* Main.storyboard */, 46C6CDD81C55BD5100FB146D /* Info.plist */, 46C6CDD91C55BD5100FB146D /* ViewController.swift */, ); path = MinamoExample; sourceTree = ""; }; 46C6CDE01C55BD6200FB146D /* MinamoTests */ = { isa = PBXGroup; children = ( 46C6CDE11C55BD6200FB146D /* MinamoTests.swift */, 46C6CDE21C55BD6200FB146D /* Info.plist */, ); path = MinamoTests; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ 4622B5221C5111BF00DBE9E5 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 46763FBB1C620107003F0E2C /* Minamo.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ 4622B5241C5111BF00DBE9E5 /* Minamo */ = { isa = PBXNativeTarget; buildConfigurationList = 4622B5391C5111BF00DBE9E5 /* Build configuration list for PBXNativeTarget "Minamo" */; buildPhases = ( 4622B5201C5111BF00DBE9E5 /* Sources */, 4622B5211C5111BF00DBE9E5 /* Frameworks */, 4622B5221C5111BF00DBE9E5 /* Headers */, 4622B5231C5111BF00DBE9E5 /* Resources */, ); buildRules = ( ); dependencies = ( ); name = Minamo; productName = Hamon; productReference = 4622B5251C5111BF00DBE9E5 /* Minamo.framework */; productType = "com.apple.product-type.framework"; }; 4622B52E1C5111BF00DBE9E5 /* MinamoTests */ = { isa = PBXNativeTarget; buildConfigurationList = 4622B53C1C5111BF00DBE9E5 /* Build configuration list for PBXNativeTarget "MinamoTests" */; buildPhases = ( 4622B52B1C5111BF00DBE9E5 /* Sources */, 4622B52C1C5111BF00DBE9E5 /* Frameworks */, 4622B52D1C5111BF00DBE9E5 /* Resources */, ); buildRules = ( ); dependencies = ( 4622B5321C5111BF00DBE9E5 /* PBXTargetDependency */, ); name = MinamoTests; productName = HamonTests; productReference = 4622B52F1C5111BF00DBE9E5 /* Minamo.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; 4622B5441C51160600DBE9E5 /* MinamoExample */ = { isa = PBXNativeTarget; buildConfigurationList = 4622B5541C51160600DBE9E5 /* Build configuration list for PBXNativeTarget "MinamoExample" */; buildPhases = ( 4622B5411C51160600DBE9E5 /* Sources */, 4622B5421C51160600DBE9E5 /* Frameworks */, 4622B5431C51160600DBE9E5 /* Resources */, ); buildRules = ( ); dependencies = ( ); name = MinamoExample; productName = HamonExample; productReference = 4622B5451C51160600DBE9E5 /* Minamo.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 4622B51C1C5111BF00DBE9E5 /* Project object */ = { isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0710; LastUpgradeCheck = 0730; ORGANIZATIONNAME = yukiasai; TargetAttributes = { 4622B5241C5111BF00DBE9E5 = { CreatedOnToolsVersion = 7.1.1; LastSwiftMigration = 0810; }; 4622B52E1C5111BF00DBE9E5 = { CreatedOnToolsVersion = 7.1.1; LastSwiftMigration = 0810; }; 4622B5441C51160600DBE9E5 = { CreatedOnToolsVersion = 7.1.1; LastSwiftMigration = 0810; }; }; }; buildConfigurationList = 4622B51F1C5111BF00DBE9E5 /* Build configuration list for PBXProject "Minamo" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 4622B51B1C5111BF00DBE9E5; productRefGroup = 4622B5261C5111BF00DBE9E5 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 4622B5241C5111BF00DBE9E5 /* Minamo */, 4622B52E1C5111BF00DBE9E5 /* MinamoTests */, 4622B5441C51160600DBE9E5 /* MinamoExample */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 4622B5231C5111BF00DBE9E5 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 4622B52D1C5111BF00DBE9E5 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 4622B5431C51160600DBE9E5 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 46C6CDDD1C55BD5100FB146D /* Main.storyboard in Resources */, 46C6CDDB1C55BD5100FB146D /* Assets.xcassets in Resources */, 46C6CDDC1C55BD5100FB146D /* LaunchScreen.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 4622B5201C5111BF00DBE9E5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 46C6CDD01C55BD4600FB146D /* RippleView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 4622B52B1C5111BF00DBE9E5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 46C6CDE31C55BD6200FB146D /* MinamoTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 4622B5411C51160600DBE9E5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 46C6CDE51C55BD6800FB146D /* RippleView.swift in Sources */, 46C6CDDF1C55BD5100FB146D /* ViewController.swift in Sources */, 46C6CDDA1C55BD5100FB146D /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 4622B5321C5111BF00DBE9E5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 4622B5241C5111BF00DBE9E5 /* Minamo */; targetProxy = 4622B5311C5111BF00DBE9E5 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ 46C6CDD41C55BD5100FB146D /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( 46C6CDD51C55BD5100FB146D /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; }; 46C6CDD61C55BD5100FB146D /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 46C6CDD71C55BD5100FB146D /* Base */, ); name = Main.storyboard; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 4622B5371C5111BF00DBE9E5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; 4622B5381C5111BF00DBE9E5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; 4622B53A1C5111BF00DBE9E5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Minamo/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = yukiasai.Minamo; PRODUCT_NAME = Minamo; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; }; name = Debug; }; 4622B53B1C5111BF00DBE9E5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Minamo/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = yukiasai.Minamo; PRODUCT_NAME = Minamo; SKIP_INSTALL = YES; SWIFT_VERSION = 3.0; }; name = Release; }; 4622B53D1C5111BF00DBE9E5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = MinamoTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = yukiasai.MinamoTests; PRODUCT_NAME = Minamo; SWIFT_VERSION = 3.0; }; name = Debug; }; 4622B53E1C5111BF00DBE9E5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = MinamoTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = yukiasai.MinamoTests; PRODUCT_NAME = Minamo; SWIFT_VERSION = 3.0; }; name = Release; }; 4622B5551C51160600DBE9E5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = MinamoExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = yukiasai.MinamoExample; PRODUCT_NAME = Minamo; SWIFT_VERSION = 3.0; }; name = Debug; }; 4622B5561C51160600DBE9E5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = MinamoExample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = yukiasai.MinamoExample; PRODUCT_NAME = Minamo; SWIFT_VERSION = 3.0; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 4622B51F1C5111BF00DBE9E5 /* Build configuration list for PBXProject "Minamo" */ = { isa = XCConfigurationList; buildConfigurations = ( 4622B5371C5111BF00DBE9E5 /* Debug */, 4622B5381C5111BF00DBE9E5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 4622B5391C5111BF00DBE9E5 /* Build configuration list for PBXNativeTarget "Minamo" */ = { isa = XCConfigurationList; buildConfigurations = ( 4622B53A1C5111BF00DBE9E5 /* Debug */, 4622B53B1C5111BF00DBE9E5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 4622B53C1C5111BF00DBE9E5 /* Build configuration list for PBXNativeTarget "MinamoTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 4622B53D1C5111BF00DBE9E5 /* Debug */, 4622B53E1C5111BF00DBE9E5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 4622B5541C51160600DBE9E5 /* Build configuration list for PBXNativeTarget "MinamoExample" */ = { isa = XCConfigurationList; buildConfigurations = ( 4622B5551C51160600DBE9E5 /* Debug */, 4622B5561C51160600DBE9E5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 4622B51C1C5111BF00DBE9E5 /* Project object */; } ================================================ FILE: Minamo.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: MinamoExample/AppDelegate.swift ================================================ // // AppDelegate.swift // MinamoExample // // Created by yukiasai on 2016/01/21. // Copyright (c) 2016 yukiasai. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true } func applicationWillResignActive(application: UIApplication) { // 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. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(application: UIApplication) { // 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. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } func applicationWillEnterForeground(application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(application: UIApplication) { // 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. } func applicationWillTerminate(application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } } ================================================ FILE: MinamoExample/Assets.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "idiom" : "iphone", "size" : "29x29", "scale" : "2x" }, { "idiom" : "iphone", "size" : "29x29", "scale" : "3x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "3x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: MinamoExample/Assets.xcassets/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: MinamoExample/Assets.xcassets/images/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: MinamoExample/Assets.xcassets/images/arrow.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "idiom" : "universal", "filename" : "arrow@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "arrow@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: MinamoExample/Assets.xcassets/images/q.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "idiom" : "universal", "filename" : "q.png", "scale" : "2x" }, { "idiom" : "universal", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: MinamoExample/Base.lproj/LaunchScreen.storyboard ================================================ ================================================ FILE: MinamoExample/Base.lproj/Main.storyboard ================================================ ================================================ FILE: MinamoExample/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 LSRequiresIPhoneOS UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main UIRequiredDeviceCapabilities armv7 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: MinamoExample/ViewController.swift ================================================ // // ViewController.swift // MinamoExample // // Created by yukiasai on 2016/01/21. // Copyright (c) 2016 yukiasai. All rights reserved. // import UIKit class ViewController: UIViewController { let rippleView = { Void -> RippleView in let view = RippleView() view.tintColor = UIColor(red: 0.3, green: 0.7, blue: 1, alpha: 1) view.coreImage = UIImage(named: "q") return view }() override func viewDidLoad() { super.viewDidLoad() } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) if !rippleView.appeared, let buttonItem = navigationItem.rightBarButtonItems?.first { rippleView.appearAtBarButtonItem(buttonItem, offset: CGPoint(x: -10, y: 10)) rippleView.delegate = self rippleView.isUserInteractionEnabled = true } } } extension ViewController: RippleViewDelegate { func rippleViewTapped(_ view: RippleView) { view.disappear() } } ================================================ FILE: MinamoTests/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 ================================================ FILE: MinamoTests/MinamoTests.swift ================================================ // // MinamoTests.swift // MinamoTests // // Created by yukiasai on 2016/01/21. // Copyright (c) 2016 yukiasai. All rights reserved. // import XCTest @testable import Minamo class MinamoTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testExample() { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } func testPerformanceExample() { // This is an example of a performance test case. self.measure { // Put the code you want to measure the time of here. } } } ================================================ FILE: README.md ================================================ # Minamo [![Pod Version](http://img.shields.io/cocoapods/v/Minamo.svg?style=flat)](http://cocoadocs.org/docsets/Minamo/) [![Pod Platform](http://img.shields.io/cocoapods/p/Minamo.svg?style=flat)](http://cocoadocs.org/docsets/Minamo/) [![Pod License](http://img.shields.io/cocoapods/l/Minamo.svg?style=flat)](http://opensource.org/licenses/MIT) Simple coach mark library written in Swift ![Demo](https://cloud.githubusercontent.com/assets/6880730/12576111/bf03362a-c454-11e5-95af-4a1670935f9e.gif) ## Usage #### Initialize ``` swift let rippeleView = RippleView() rippeleView.tintColor = UIColor(red: 0.3, green: 0.7, blue: 1, alpha: 1) rippeleView.coreImage = UIImage(named: "q") ``` #### Appear at the UIView ``` swift rippeleView.appearAtView(someView) ``` #### Appear at the UIBarButtonItem ``` swift if let buttonItem = navigationItem.rightBarButtonItems?.first { rippeleView.appearAtBarButtonItem(buttonItem, offset: CGPointMake(-10, 10)) } ``` #### Dismiss ``` swift rippleView.disappear() ``` ## Properties `RippleView` has some properties. * duration * coreImage * coreHidden * ringScale * ringWidth * ringHidden * contentInset ## Installation #### CocoaPods ``` pod 'Minamo' ``` ## License Minamo is released under the MIT license. See LICENSE for details.