Skip to content

Commit a7dd450

Browse files
committed
Trying to get height properly
1 parent 3911f63 commit a7dd450

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ios/DatePicker.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,13 @@ - (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverControl
104104

105105

106106
- (UIView *)createActionSheet:(NSMutableDictionary *)options {
107+
UIView *containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, self.webView.superview.frame.size.height)];
108+
107109
UIView *actionSheet = [[UIView alloc] initWithFrame:CGRectMake(0, self.webView.superview.frame.size.height - 485, 320, 485)];
108110
actionSheet.backgroundColor = [UIColor whiteColor];
109111

112+
[containerView addSubview:actionSheet];
113+
110114
// date picker
111115
CGRect frame = CGRectMake(0, 40, 0, 0);
112116
if(!self.datePicker){
@@ -121,9 +125,9 @@ - (UIView *)createActionSheet:(NSMutableDictionary *)options {
121125
UISegmentedControl *doneButton = [self createDoneButton:options];
122126
[actionSheet addSubview:doneButton];
123127
// show UIActionSheet
124-
[self.webView.superview addSubview:actionSheet];
128+
[self.webView.superview addSubview:containerView];
125129

126-
return actionSheet;
130+
return containerView;
127131
}
128132

129133
- (UIPopoverController *)createPopover:(NSMutableDictionary *)options {

0 commit comments

Comments
 (0)