Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

Thread: GAH!!!
View Single Post
Old 04-10-2009, 03:29 AM   #2 (permalink)
Daniel S.
Registered Member
 
Join Date: Mar 2009
Posts: 14
Daniel S. is on a distinguished road
Default

try this:

Code:
#import "MPMoviePlayerController.h"

@implementation MPMoviePlayerController
@synthesize contentURL;

- (id)initWithContentURL:(NSURL *) url //here you set the name of the parameter that can be passed to the method, you can pass the URL when you call the method
{
    // not sure what Users/PMW/Desktop/HeartMonitor/HeartMonitor.mov was doing here, pass a url when you call the mehod
}	

- (id)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        // Initialization code
    }
    return self;
}


- (void)drawRect:(CGRect)rect {
    // Drawing code
}


- (void)dealloc {
    [super dealloc];
} //one bracket is enough

@end
But I don't see the point in why you are implementing initWithContentURL in a controller class. Correct me if I'm wrong but normally you would want to do something like
Code:
 [myMoviePlayer initWithContentURL: [NSURL URLWithString @"whatever"] ];

Last edited by Daniel S.; 04-10-2009 at 03:50 AM.
Daniel S. is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,633
Threads: 94,090
Posts: 402,789
Top Poster: BrianSlick (7,990)
Welcome to our newest member, nor9849
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:42 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.