#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
Could you show some more code? The interface and implementation of your controller. And perhaps a description of what you want to do?
Because I still don't get it
ok so i put the new string in and i still have the same error and i have a warning that says @end is missing in implementation context.
Quote:
Originally Posted by Daniel S.
Could you show some more code? The interface and implementation of your controller. And perhaps a description of what you want to do?
Because I still don't get it
Pardon the blunt response, but this is the most basic of the basic stuff here -- simple, error-free class building. You really to find a good Objective-C reference and start from Chapter 1.
Could you show some more code? The interface and implementation of your controller. And perhaps a description of what you want to do?
Because I still don't get it
im simply trying to put a short movie into the app
im simply trying to put a short movie into the app
I understood that. But the code I posted (the implementation of the class) should work so I don't understand what you did. Which new string did you put in? And above all where? As far as I see it my code didn't contain any strings
Perhaps you should really start with the basics as Kalimba said.
There are several restrictions about which mov files can be played. You might want to take a look at the documentation. Does the video you want to play play on an iPod?
There are several restrictions about which mov files can be played. You might want to take a look at the documentation. Does the video you want to play play on an iPod?
Take a look at the apple website about the supported video formats:
Quote:
H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; H.264 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats