My favorites | Sign in
Project Logo
                
Search
for
Updated Aug 12, 2008 by dan94501
HowToIntegrate  
How to integrate iMedia Browser into your application.

Introduction

In most cases, where you want a floating panel, integrating the iMedia framework is just a few steps. You can get more fancy and just make use of individual views, but that will require you to dig into the source code a bit... or perhaps we will have some more content here.

Details

Download the framework from the 'source' tab in Google Code. You will probably want to look at the open issues as well just to know what people may be working on. Note that we don't have any formal releases, so it's probably a good idea for you to pay attention to the state of things on the mailing list to see how stable the current version is. (We try to keep it stable at all times!)

Optionally implement some iMedia delegate methods in your App delegate, such as:

Implement an action to show/hide the media browser. You may want to also deal with 'back of the window' showing. Here is how it is done in Sandvox:

- (IBAction)toggleMediaBrowserShown:(id)sender
{
	
	iMediaBrowser *browser = [iMediaBrowser sharedBrowserWithDelegate:self];
	
	if ( [browser infoWindowIsVisible] )
	{
		[browser flipBack:nil];
	}
		
	BOOL newValue = ![[browser window] isVisible];
	
	// set menu to opposite of flag
	if ( newValue )
	{
		[[NSApp delegate] setDisplayMediaMenuItemTitle:KTHideMediaMenuItemTitle];
		[browser setIdentifier:@"Sandvox"];
		[browser showWindow:sender];
	}
	else
	{
		[[NSApp delegate] setDisplayMediaMenuItemTitle:KTShowMediaMenuItemTitle];
		[browser close];
	}

	// display Media, if appropriate
}

You can look at the iMedia Browser project itself and see how it is integrated into the test application.


Sign in to add a comment
Hosted by Google Code