Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Frédéric Maquin
    @ephread
    @danthony22 you can use CoachMark.allowTouchInsideCutoutPath, see https://github.com/ephread/Instructions#customizing-how-the-coach-mark-will-show
    Frédéric Maquin
    @ephread
    @kpawansingh you need to provide your own, custom views. See here: https://github.com/ephread/Instructions/issues/82#issuecomment-258210593
    @PLSV I don't think you can achieve this, sadly. But it's an interesting use case. I'll probably allow for coach mark to either stack to the left or the right of the point of interested in the future.
    shishir
    @shishir79498715_twitter
    can we show coach marks on selecting a particular view ?
    Mohammad Nobakht
    @ntmohammad
    is it possible o change font or border of selected view ?
    Szmbbq
    @Szmbbq
    Hi all, I am new to this library and I just tried to follow the tutorial but ended up having "The overlay view added to the window has empty bounds" error. Is there a way to fix this? I am using Instruction 1.4.0 and Swift 5. Thanks!
    Frédéric Maquin
    @ephread
    @shishir79498715_twitter I'm not sure I understand what you mean — you can start the flow from code at any moment
    @ntmohammad you can use custom views to have the look and feel you want.
    @Szmbbq in which method are you calling start(in:)?
    Szmbbq
    @Szmbbq
    @ephread Hi, I called in viewDidAppear.
    Szmbbq
    @Szmbbq
    This is the code I am playing with. Just a simple view controller.
    import UIKit
    import Instructions
    
    class ViewController: UIViewController, CoachMarksControllerDataSource, CoachMarksControllerDelegate {
        let coachMarksController = CoachMarksController()
        let pointOfInterest = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 200))
        override func viewDidLoad() {
            super.viewDidLoad()
            // Do any additional setup after loading the view.
            self.view.addSubview(pointOfInterest)
            pointOfInterest.backgroundColor = .black
            self.coachMarksController.dataSource = self
            self.coachMarksController.delegate = self
        }
    
        override func viewDidAppear(_ animated: Bool) {
            super.viewDidAppear(animated)
    
            self.coachMarksController.start(in: .window(over: self))
        }
    
        override func viewWillDisappear(_ animated: Bool) {
            super.viewWillDisappear(animated)
    
            self.coachMarksController.stop(immediately: true)
        }
    
        func numberOfCoachMarks(for coachMarksController: CoachMarksController) -> Int {
            return 1
        }
    
        func coachMarksController(_ coachMarksController: CoachMarksController,
                                      coachMarkAt index: Int) -> CoachMark {
            return coachMarksController.helper.makeCoachMark(for: pointOfInterest)
        }
    
        func coachMarksController(_ coachMarksController: CoachMarksController, coachMarkViewsAt index: Int, madeFrom coachMark: CoachMark) -> (bodyView: CoachMarkBodyView, arrowView: CoachMarkArrowView?) {
            let coachViews = coachMarksController.helper.makeDefaultCoachViews(withArrow: true, arrowOrientation: coachMark.arrowOrientation)
    
            coachViews.bodyView.hintLabel.text = "Hello! I'm a Coach Mark!"
            coachViews.bodyView.nextLabel.text = "Ok!"
    
            return (bodyView: coachViews.bodyView, arrowView: coachViews.arrowView)
        }
    
    }
    Frédéric Maquin
    @ephread
    @Szmbbq alright, thanks for the code sample, I'll have a look as soon as I can and get back to you :)
    Szmbbq
    @Szmbbq
    @ephread Thank you!
    Mohammad Nobakht
    @ntmohammad
    thanks for answer , i need to add a border with red color to cutout path . i cant undesratand what should i do
    @ephread should i edit the library for that ?
    David Corbin
    @dcorbin
    It appears to me like I should be able to treat https://github.com/ephread/Instructions.git as a Swift package, but I get an error when I do so, I get an error "
    Showing All Messages
    The package dependency graph can not be resolved; unable find any available tag for the following requirements:
    ". Should I able to do this? If so, any ideas why it's failing?
    David Corbin
    @dcorbin
    I forked Instructions, re-generated the Packages.swift file, committed and tagged it as 1.4.1 and that works, so I think it's just that the Swift package file is out of date in some way.
    David Corbin
    @dcorbin
    Never mind. I've just seen that SPM doesn't yet support resources.
    Frédéric Maquin
    @ephread
    @ntmohammad yep, it's not supported right now, but PRs are welcome.
    @dcorbin sadly yeah, SPM support in Instructions has been in limbo for years, because it doesn't support resources. This proposal was accepted a month ago though, so it may be around the corner.
    stripes
    @stripes
    I'm trying to resurrect a several year old project of mine. It used an old copy of Instructions, which I have updated to what looks like the current one. I changed a bunch of stuff to track current API changes, but one is alluding me. I have "coachMarksController.start(in: .window(over: self))", but I'm being told "Value of type 'CoachMarksController' has no member 'start'", which seems odd as I can see it in the source... I have attempted a clean build and still get it. Any ideas on what to attempt next?
    (also tried clean build folder)
    I literally have: let coachMarksController = CoachMarksController();
    coachMarksController.dataSource = self
    coachMarksController.start(in: .window(over: self))
    (I know it should be a view controller property, but I'm just looking r a minimal test case)
    권영호
    @y0ung1019
    Hello! First, thanks for great library.
    My question is "How to 'overlay cutoutPath' animation?". Is there any sample code? I did 'coachMarkView animation' with CoachMarksControllerAnimationDelegate protocol.
    I want to do IdleAnimation
    func coachMarksController(_ coachMarksController: CoachMarksController,
                                  fetchIdleAnimationOfCoachMark coachMarkView: UIView,
                                  at index: Int,
                                  using manager: CoachMarkAnimationManager)
    Frédéric Maquin
    @ephread
    @stripes you may want to take a look at #198 or #224
    @y0ung1019 what kind of animation are you after?
    Shlok Tyagi
    @shlok-tyagi
    When returning a CoachMark which has been created using UIBezierPath ,I am trying to give a fill and stroke ,but it wouldn't show up with the CoachMark.I am basically trying to highlight the coachmarked view ,if there is any other way to achieve that ,please let me know.
    I want a gradient to appear on the highlighted view.
    Frédéric Maquin
    @ephread
    @shlok-tyagi it's not possible at the moment, sadly. The bezier path is only used to create a mask, it can't be customized further.
    nicolas
    @satan87
    Hello,
    Is it compatible with SwiftUI?
    Frédéric Maquin
    @ephread
    @satan87 interesting question. Not out of the box for sure, but I wonder what would happen if it was added in a UIViewControllerRepresentable.
    I’ll try that when I get the chance.
    nicolas
    @satan87
    Thanks:) let me know.
    I just ship a new app and it would be a great addition (as people need to input their data, it would really help them)
    Shlok Tyagi
    @shlok-tyagi
    @ephread thanks for the response and the awesome library.
    Just incase anyone was curious ,and wanted to achieve the effect I wanted (A gradient on the highlighted view),you can do so.
    Just create a view with the same dimensions as the UIBezierPath you return to create the coach mark.
    Add a CAGradientLayer() to that view and add that as a subview to your self.view at the exact location of the coach mark.
    Because the coach mark itself is transparent, it will appear as if the highlighted view itself has a gradient.
    Dhiraj Kumar Jain
    @TheAlgo
    Is this library supported in iOS 10+?
    Sandy Rishi
    @appstationnz
    I have uses installing Cocoapods on macbook pro

    I have uses installing Cocoapods on macbook pro

    I am getting errors:
    Building native extensions. This could take a while...
    ERROR: Error installing cocoapods:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/ext/ffi_c

    /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210211-1643-1mxf6ym.rb extconf.rb
    extconf.rb failed
    Could not create Makefile due to some reason, probably lack of necessary
    libraries and/or headers. Check the mkmf.log file for more details. You may
    need configuration options.

    Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
    --with-ffi_c-dir
    --without-ffi_c-dir
    --with-ffi_c-include
    --without-ffi_c-include=${ffi_c-dir}/include
    --with-ffi_c-lib
    --without-ffi_c-lib=${ffi_c-dir}/lib
    --enable-system-libffi
    --disable-system-libffi
    --with-libffi-config
    --without-libffi-config
    --with-pkg-config
    --without-pkg-config
    /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:inblock in try_link0'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in mktmpdir' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:intry_link0'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in try_link' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:672:intry_ldflags'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1832:in pkg_config' from extconf.rb:9:insystem_libffi_usable?'
    from extconf.rb:42:in `<main>'

    To see why this extension failed to compile, please check the mkmf.log which can be found here:

    /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.14.2/mkmf.log

    extconf failed, exit code 1

    Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2 for inspection.
    Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.14.2/gem_make.out

    sillyguodong
    @sillyguodong
    Hey guys
    Is there a way to know that all coachMarks has been clicked?
    Frédéric Maquin
    @ephread
    @sillyguodong hey there, I replied to you on Github!
    madhumb
    @madhumb
    Hi Al
    my application is both objective c and swift. I wanted to use. instructions for objective c files. it is supported?
    madhumb
    @madhumb
    @ephread Could you help me in intrgrating this library with my objective c + Swift project. I'm failing to add fist line.it says Unknow type name CoachMarksController in .m file.. is this library for pure swift project ?
    Frédéric Maquin
    @ephread
    Hey @madhumb, it's possible to use Instructions with Objective-C but it requires a bit of Swift glue. The library uses pure Swift types such as structs and tuples that can't be bridged to Objective-C. There's a very old, completely outdated example (it won't compile) in the objective-c branch, but it can give you pointers. https://github.com/ephread/Instructions/blob/objective-c/Example%20Objective-C/InstructionsManager.swift
    madhumb
    @madhumb
    @ephread yes thanks. i am using InstructionManager and working with it.
    madhumb
    @madhumb
    @ephread thanks for the support. i need to add two buttons in coach marks inaddition to Ok button. can we enable tap on these button and send these callbacks to main controller?
    Frédéric Maquin
    @ephread
    @madhumb yes, you can provide custom views and the use manual flow control through a delegate, selector or block based mechanism.
    madhumb
    @madhumb
    @ephread yeah that was it. Very good library. saved so much of my time. thanks.