Inherits from UIViewController
Conforms to OCRDetailViewProtocol
SubstitutableDetailViewController
Declared in OCRBaseDetailViewController.h
OCRBaseDetailViewController.m

Overview

This class defines common properties and methods for detail view controllers.

Properties

titleLabel

IBOutlet to the titleLabel.

@property (nonatomic, strong) IBOutlet UILabel *titleLabel

Declared In

OCRBaseDetailViewController.h

Instance Methods

configureView

Configure the view.

- (void)configureView

Discussion

Subclasses are required to override this method. Therefore the base class throws an exception if called.

Declared In

OCRBaseDetailViewController.m

didReceiveMemoryWarning

Sent to the view controller when the app receives a memory warning.

- (void)didReceiveMemoryWarning

Discussion

Your app never calls this method directly. Instead, this method is called when the system determines that the amount of available memory is low.

You can override this method to release any additional memory used by your view controller. If you do, your implementation of this method must call the super implementation at some point.

Declared In

OCRBaseDetailViewController.m

invalidateRootPopoverButtonItem:

Hides the bar button item.

- (void)invalidateRootPopoverButtonItem:(UIBarButtonItem *)aBarButtonItem

Parameters

aBarButtonItem

the bar button item to hide.

Declared In

OCRBaseDetailViewController.m

reloadFetchedResults:

Reloads the fetched results.

- (void)reloadFetchedResults:(NSNotification *)aNote

Parameters

aNote

the NSNotification describing the changes.

Discussion

Invoked by notification whhen the underlying data objects may have changed.

Declared In

OCRBaseDetailViewController.m

setSelectedManagedObject:

Set the selectedManagedObject property

- (void)setSelectedManagedObject:(Packages *)aSelectedPackage

Parameters

aSelectedPackage

the Packages to set.

Discussion

If the new Packages property is different than what the detail view is currently displaying, it will invoke the configureView method of the subclass.

Declared In

OCRBaseDetailViewController.m

showRootPopoverButtonItem:withController:

Sets the bar button item that will invoke the master view.

- (void)showRootPopoverButtonItem:(UIBarButtonItem *)aBarButtonItem withController:(UIPopoverController *)aPopoverController

Parameters

aBarButtonItem

the bar button item to install.

aPopoverController

the popoverController of the master view.

Declared In

OCRBaseDetailViewController.m

viewDidAppear:

Notifies the view controller that its view was added to a view hierarchy.

- (void)viewDidAppear:(BOOL)animated

Parameters

animated

If YES, the disappearance of the view is being animated.

Discussion

You can override this method to perform additional tasks associated with presenting the view. If you override this method, you must call super at some point in your implementation.

Note - If a view controller is presented by a view controller inside of a popover, this method is not invoked on the presenting view controller after the presented controller is dismissed.

Declared In

OCRBaseDetailViewController.m

viewWillAppear:

Notifies the view controller that its view is about to be added to a view hierarchy.

- (void)viewWillAppear:(BOOL)animated

Parameters

animated

If YES, the view is being added to the window using an animation.

Discussion

This method is called before the receiver’s view is about to be added to a view hierarchy and before any animations are configured for showing the view. You can override this method to perform custom tasks associated with displaying the view. For example, you might use this method to change the orientation or style of the status bar to coordinate with the orientation or style of the view being presented. If you override this method, you must call super at some point in your implementation.

For more information about the how views are added to view hierarchies by a view controller, and the sequence of messages that occur, see “Responding to Display-Related Notifications”.

Note If a view controller is presented by a view controller inside of a popover, this method is not invoked on the presenting view controller after the presented controller is dismissed.

Declared In

OCRBaseDetailViewController.m

viewWillDisappear:

Notifies the view controller that its view is about to be removed from a view hierarchy.

- (void)viewWillDisappear:(BOOL)animated

Parameters

animated

If YES, the disappearance of the view is being animated.

Discussion

This method is called in response to a view being removed from a view hierarchy. This method is called before the view is actually removed and before any animations are configured.

Subclasses can override this method and use it to commit editing changes, resign the first responder status of the view, or perform other relevant tasks. For example, you might use this method to revert changes to the orientation or style of the status bar that were made in the viewDidDisappear: method when the view was first presented. If you override this method, you must call super at some point in your implementation.

Declared In

OCRBaseDetailViewController.m