Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (UIView *)inputAccessoryView {
- if (!inputAccessoryView) {
- CGRect accessFrame = CGRectMake(0.0, 0.0, 380.0, 215.0);
- inputAccessoryView = [[UIView alloc] initWithFrame:accessFrame];
- UIDatePicker *picker = [[UIDatePicker alloc] init];
- picker.datePickerMode = UIDatePickerModeTime;
- UIBarButtonItem *flexSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil];
- UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleBordered target:self.parentViewController action:@selector(setBlackoutPeriod:)];
- //closeButton.tag = indexPath.row;
- UIToolbar *pickerDateToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, -44, 320, 44)];
- pickerDateToolbar.barStyle = UIBarStyleBlackTranslucent;
- [pickerDateToolbar sizeToFit];
- [pickerDateToolbar setItems:[[NSArray alloc] initWithObjects:flexSpace,closeButton, nil] animated:YES];
- [inputAccessoryView addSubview:picker];
- [inputAccessoryView addSubview:pickerDateToolbar];
- }
- return inputAccessoryView;
- }
Add Comment
Please, Sign In to add comment