DataPickerViewController.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright 2021 Google LLC
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <UIKit/UIKit.h>
  17. @class DataPickerState;
  18. // This view controller controls a table view meant to select
  19. // options from a list. The list is supplied from the DataPickerDictionary.plist
  20. // file based upon what |dataKey| the controller is initialized with.
  21. @interface DataPickerViewController : UITableViewController
  22. // |dataState| stores the list of cells and the current set of selected cells.
  23. // It should be created and owned by whoever owns the DataPickerViewController,
  24. // so we only need a weak reference to it from here.
  25. @property(weak, readonly, nonatomic) DataPickerState *dataState;
  26. // This method initializes a DataPickerViewController using
  27. // a DataPickerState object, from which the view controller
  28. // obtains cell information for use in its table.
  29. - (id)initWithNibName:(NSString *)nibNameOrNil
  30. bundle:(NSBundle *)nibBundleOrNil
  31. dataState:(DataPickerState *)dataState;
  32. @end