Skip to content

Commit

Permalink
Fixed appearance problems
Browse files Browse the repository at this point in the history
  • Loading branch information
lfarah committed Jul 19, 2016
1 parent 9830aa0 commit eb93c97
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Demo/Library/DatePickerDialog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ public class DatePickerDialog: UIView {

/* Handle device orientation changes */
func deviceOrientationDidChange(notification: NSNotification) {
close() // For now just close it

self.frame = CGRectMake(0, 0, UIScreen.mainScreen().bounds.size.width, UIScreen.mainScreen().bounds.size.height)
let screenSize = countScreenSize()
let dialogSize = CGSizeMake(300,230 + kDatePickerDialogDefaultButtonHeight + kDatePickerDialogDefaultButtonSpacerHeight)
dialogView.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height)
}

/* Create the dialog view, and animate opening the dialog */
Expand Down Expand Up @@ -114,6 +118,8 @@ public class DatePickerDialog: UIView {
}

self.removeFromSuperview()
self.setupView()

}
}

Expand Down

2 comments on commit eb93c97

@lfarah
Copy link
Collaborator Author

@lfarah lfarah commented on eb93c97 Jul 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes #27

@lfarah
Copy link
Collaborator Author

@lfarah lfarah commented on eb93c97 Jul 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes #18

Please sign in to comment.