Skip to content

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AfterX

Version License Platform

AfterX uses the UserDefaults to keep track of tasks you have performed before. It keeps track of the tasks using the task identifier you give.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

When you want to do something only once during the lifetime of the app:

  AfterX.doOnce(task: "button_hint") {
    self.showHint()
  }

When you want to do something once after the user has performed a task an x amount of times:

  func calledWhenSucceedingTask() {

    ...
    
    AfterX.do(task: "ask_for_review", after: 5) {
      self.askForReview()
    }
  }

You can reset the count for a task:

  AfterX.resetCount("my_task")

Or reset the count for all tasks:

  AfterX.resetAll()

Requirements

Installation

AfterX is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "AfterX"

Author

Marcel Borsten, marcel@impart.nl

License

AfterX is available under the MIT license. See the LICENSE file for more info.

About

AfterX helps you keep track of things you only want to do once, or after x amount of times, during the application lifetime

Topics

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages