Skip to content
9miao edited this page Sep 26, 2014 · 2 revisions

CAWindow

Class Description

CAWindow mainly acts as a carrier/container for all view to distribute touch message and help viewController to manage applications.Generally applications only have one window, and no more than one window is allowed to receive screen event even though there are multi windows.This window is created when application starts and is added one or multi view to display, later it will hardly ever be cited again.CAWindow, root of all CAViews, is responsible for the management and coordination of application display.

Base Class

CAView

Attribute

Access modifier

Attribute name

Description

protected

RootViewController

root view controller

protected

ModalViewController

temporary viewController

Method

Access modifier

Method name

Description

public

presentModalViewController

pop up a new viewController

public

dismissModalViewController

hide the new viewController

Attribute Description

RootViewController
Type:CAViewController*
Descripiton: you can obtain and set current window’s root view controller via get/set.

ModalViewController
Type:CAViewController*
Descripiton: read-only property, what temporary viewController means is that system pops up a new viewController in current viewController and interrupt operations of current viewController. A temporary viewController is well suitable for the condition that we need to temporarily display some contents.

Method Description

void presentModalViewController(CAViewController controller, bool animated)*
Return value:void
Parameter:

Type

Parameter name

Description

CAViewController*

controller

new viewController

bool

animated

play pop-up animation or not

Descripiton: generate a new viewController and pop up this viewController from screen bottom, and cover the previous picture to self implement newly pop-up viewContoller’s content.

void dismissModalViewController(bool animated)
Return value:void
Descripiton: hide the new viewController.

Clone this wiki locally