Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add action according to situation #6

Closed
mironal opened this issue Mar 29, 2018 · 0 comments
Closed

Add action according to situation #6

mironal opened this issue Mar 29, 2018 · 0 comments

Comments

@mironal
Copy link
Owner

mironal commented Mar 29, 2018

feel lazy 馃槱

let alert = UIAlertController(blah blah blah)

// 馃槱馃槱馃槱馃槱馃槱馃槱馃槱馃槱馃槱
if someSituation {
  alert.default("Hoge action") { _ in
    // do something
  }
}

alert.cancel()
  .present(in: self)

awesome 馃槃

UIAlertController(blah blah blah)
  .default("Hoge action", addAction: someSituation) { _ in
    // do something
  }
  .cancel()
  .present(in: self)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant