Messaging: Difference between revisions

From Medien Wiki
No edit summary
Line 28: Line 28:


== Subclassing ==
== Subclassing ==
Sometimes there are simpler ways to get notified of certain events. For example, there are some methods in UIView
Sometimes there are simpler ways to get notified of or to react to certain events. For example, there are some methods in UIViewController that can be overridden by subclasses:
 
...
 


<source lang="objc">
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration;
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration;
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation;
</source>


== Delegation & Notification ==
== Delegation & Notification ==