Skip to content

Commit

Permalink
Update 1.1.4
Browse files Browse the repository at this point in the history
- Fixed content offset bug.
- Added `estimatedHeight` var that returns the estimated height of the dialog view even it if it hasn't been loaded yet.
- Added `rubberEnabled` var which is true by default. when enabled it will add a rubber effect when trying to swipe the dialog up.
  • Loading branch information
Minitour committed Aug 4, 2017
1 parent 3799374 commit fad5ad7
Show file tree
Hide file tree
Showing 3 changed files with 170 additions and 33 deletions.
2 changes: 1 addition & 1 deletion AZDialogView.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AZDialogView"
s.version = "1.1.3"
s.version = "1.1.4"
s.summary = "A highly customizable alert dialog controller that mimics Snapchat's alert dialog."
s.homepage = "https://github.com/Minitour/AZDialogViewController"
s.license = "MIT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class ViewController: UIViewController {
}

func editUserDialog(){
let dialogController = AZDialogViewController(title: "This is a very long string and I am really bored. whatever mate", message: "minitour")
let dialogController = AZDialogViewController(title: "Antonio Zaitoun", message: "minitour")
dialogController.showSeparator = true

dialogController.addAction(AZDialogAction(title: "Edit Name", handler: { (dialog) -> (Void) in
Expand Down Expand Up @@ -226,8 +226,14 @@ class ViewController: UIViewController {

dialogController.dismissWithOutsideTouch = true

let x: CGFloat = self.view.frame.height / 2.0 - dialogController.estimatedHeight / 2.0 - 16

dialogController.contentOffset = x

dialogController.show(in: self)



}

func reportUserDialog(controller: UIViewController){
Expand Down Expand Up @@ -364,10 +370,13 @@ class ViewController: UIViewController {

extension ViewController: UITableViewDelegate{
public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(indexPath)
tableView.deselectRow(at: indexPath, animated: true)
dismiss(animated: true, completion: nil)
}
}



extension ViewController: UITableViewDataSource{
func numberOfSections(in tableView: UITableView) -> Int {
return 1
Expand Down
Loading

0 comments on commit fad5ad7

Please sign in to comment.