BaseDemoViewController.m 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright 2016 Google LLC. All rights reserved.
  3. *
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
  6. * file except in compliance with the License. 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 distributed under
  11. * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  12. * ANY KIND, either express or implied. See the License for the specific language governing
  13. * permissions and limitations under the License.
  14. */
  15. #import "GooglePlacesDemos/Support/BaseDemoViewController.h"
  16. @implementation BaseDemoViewController
  17. + (NSString *)demoTitle {
  18. // This should be overridden by subclasses, so should not be called.
  19. return nil;
  20. }
  21. - (instancetype)initWithNibName:(NSString *)name bundle:(NSBundle *)bundle {
  22. if ((self = [super initWithNibName:name bundle:bundle])) {
  23. self.title = [[self class] demoTitle];
  24. }
  25. return self;
  26. }
  27. @end