日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Cocoa touch(六):UIViewController

發布時間:2025/3/21 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Cocoa touch(六):UIViewController 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

iOS程序是基于MVC設計模式的,UIViewController是Controller的基類,一般我們通過繼承這個類來實現自己的Controller,框架為我們提供了一些定義好的子類,如UINavigationController,UITabbarController

Creating a View Controller Using Nib Files

  • –?initWithNibName:bundle:
  • ???nibName??property
  • ???nibBundle??property

Using a Storyboard

  • –?shouldPerformSegueWithIdentifier:sender:
  • –?performSegueWithIdentifier:sender:
  • –?prepareForSegue:sender:
  • ???storyboard??property
  • –?canPerformUnwindSegueAction:fromViewController:withSender:

Managing the View

  • ???view??property
  • –?isViewLoaded
  • –?loadView
  • –?viewDidLoad
  • ???title??property
  • –?viewDidUnload?Deprecated in iOS 6.0
  • –?viewWillUnload?Deprecated in iOS 6.0

Handling Memory Warnings

  • –?didReceiveMemoryWarning

Responding to View Events

  • –?viewWillAppear:
  • –?viewDidAppear:
  • –?viewWillDisappear:
  • –?viewDidDisappear:
  • –?viewWillLayoutSubviews
  • –?viewDidLayoutSubviews

Testing for Specific Kinds of View Transitions

  • –?isMovingFromParentViewController
  • –?isMovingToParentViewController
  • –?isBeingPresented
  • –?isBeingDismissed

Configuring the View’s Layout Behavior

  • –?updateViewConstraints
  • ???wantsFullScreenLayout??property

Configuring the View Rotation Settings

  • –?shouldAutorotate
  • –?supportedInterfaceOrientations
  • –?preferredInterfaceOrientationForPresentation
  • ???interfaceOrientation??property
  • +?attemptRotationToDeviceOrientation
  • –?rotatingHeaderView
  • –?rotatingFooterView
  • –?shouldAutorotateToInterfaceOrientation:?Deprecated in iOS 6.0

Responding to View Rotation Events

  • –?willRotateToInterfaceOrientation:duration:
  • –?willAnimateRotationToInterfaceOrientation:duration:
  • –?didRotateFromInterfaceOrientation:
  • –?didAnimateFirstHalfOfRotationToInterfaceOrientation:?Deprecated in iOS 5.0
  • –?willAnimateFirstHalfOfRotationToInterfaceOrientation:duration:?Deprecated in iOS 5.0
  • –?willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration:?Deprecated in iOS 5.0

Responding to Containment Events

  • –?willMoveToParentViewController:
  • –?didMoveToParentViewController:

Adding Editing Behaviors to Your View Controller

  • ???editing??property
  • –?setEditing:animated:

Managing State Restoration

  • ???restorationIdentifier??property
  • ???restorationClass??property
  • –?encodeRestorableStateWithCoder:
  • –?decodeRestorableStateWithCoder:

Presenting Another View Controller’s Content

  • –?presentViewController:animated:completion:
  • –?dismissViewControllerAnimated:completion:
  • ???modalTransitionStyle??property
  • ???modalPresentationStyle??property
  • ???definesPresentationContext??property
  • ???providesPresentationContextTransitionStyle??property
  • –?disablesAutomaticKeyboardDismissal
  • –?dismissModalViewControllerAnimated:?Deprecated in iOS 6.0
  • –?presentModalViewController:animated:?Deprecated in iOS 6.0

Getting Other Related View Controllers

  • ???presentingViewController??property
  • ???presentedViewController??property
  • ???parentViewController??property
  • ???navigationController??property
  • ???splitViewController??property
  • ???tabBarController??property
  • ???searchDisplayController??property
  • ???modalViewController??property?Deprecated in iOS 6.0

Managing Child View Controllers in a Custom Container

  • ???childViewControllers??property
  • –?addChildViewController:
  • –?removeFromParentViewController
  • –?shouldAutomaticallyForwardRotationMethods
  • –?shouldAutomaticallyForwardAppearanceMethods
  • –?transitionFromViewController:toViewController:duration:options:animations:completion:
  • –?beginAppearanceTransition:animated:
  • –?endAppearanceTransition
  • –?viewControllerForUnwindSegueAction:fromViewController:withSender:
  • –?segueForUnwindingToViewController:fromViewController:identifier:
  • –?automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers?Deprecated in iOS 6.0

Configuring a Navigation Interface

  • ???navigationItem??property
  • –?editButtonItem
  • ???hidesBottomBarWhenPushed??property
  • –?setToolbarItems:animated:
  • ???toolbarItems??property

Configuring Tab Bar Items

  • ???tabBarItem??property

Configuring Display in a Popover Controller

  • ???contentSizeForViewInPopover??property
  • ???modalInPopover??property

轉載于:https://www.cnblogs.com/iprogrammer/p/3252711.html

總結

以上是生活随笔為你收集整理的Cocoa touch(六):UIViewController的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。