Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

AppDelegate.m 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. Licensed to the Apache Software Foundation (ASF) under one
  3. or more contributor license agreements. See the NOTICE file
  4. distributed with this work for additional information
  5. regarding copyright ownership. The ASF licenses this file
  6. to you under the Apache License, Version 2.0 (the
  7. "License"); you may not use this file except in compliance
  8. with the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing,
  11. software distributed under the License is distributed on an
  12. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  13. KIND, either express or implied. See the License for the
  14. specific language governing permissions and limitations
  15. under the License.
  16. */
  17. #import "AppDelegate.h"
  18. #import "ViewController.h"
  19. @implementation AppDelegate
  20. - (void)createViewController
  21. {
  22. NSAssert(!self.viewController, @"ViewController already created.");
  23. self.viewController = [[ViewController alloc] init];
  24. self.viewController.wwwFolderName = @"www";
  25. self.viewController.startPage = @"index.html";
  26. // NOTE: To customize the view's frame size (which defaults to full screen), override
  27. // [self.viewController viewWillAppear:] in your view controller.
  28. self.window.rootViewController = self.viewController;
  29. }
  30. - (void)destroyViewController
  31. {
  32. self.viewController = nil;
  33. }
  34. - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
  35. {
  36. BOOL retVal = [super application:application didFinishLaunchingWithOptions:launchOptions];
  37. // Create the main view on start-up only when not running unit tests.
  38. if (!NSClassFromString(@"CDVWebViewTest")) {
  39. [self createViewController];
  40. }
  41. return retVal;
  42. }
  43. @end