בקשות בקשות ...
אני מניח שיש לך את הקוד הבא :
NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource

"Movie" ofType

"m4v"]; NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain]; MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; theMovie.scalingMode = MPMovieScalingModeAspectFill; [theMovie play];
ואם אין לך את הקוד הזה תוכל להשתמש בו רק שלא באותו ה UIView שבו אתה צריך להציג את הסרט, זה פשוט לא אפשרי. לצורך העניין תמיד תוכל לייצר מנגנון סרטים משל עצמך שיריץ קבוצת תמונות בסינכרון של 30FPS ושמע ברקע זה עובד לגדולים ביותר. אני חייב לציין שאתה מכוון לאוכלוסיית מכשירים הולכת ונעלמת, אין צורך "להיצמד לקיר" בגלל שאתה מניח שיש מספר מכשירים חסרי שדרוג. אך אם בכ"ז תרצה לממש את עניין הסרט ללא פאנל הבקרה תוכל להיעזר בקוד הבא:
[[NSNotificationCenter defaultCenter] addObserver:self selector

selector(keyWindowChanged

name:UIWindowDidBecomeKeyNotification object:nil];
או שתנסה את הקוד הבא ליצירת האובייקט MPMoviePlayerController :
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:yourString]]; [[NSNotificationCenter defaultCenter] addObserver:self selector

selector(handleKeyWindowChanged

name:UIWindowDidBecomeKeyNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector

selector(moviePlayBackDidFinish

name

"MPMoviePlayerPlaybackDidFinishNotification" object

layer]; [player play];
והוסף את הקוד הבא ל View שלך ...
-(void)handleKeyWindowChanged

NSNotification*)note { NSArray *windows = [[UIApplication sharedApplication] windows]; if([windows count] > 2) { UIWindow *mpw = [windows objectAtIndex:1]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero]; label.text = @"Hi, I'm on your MPMoviePlayerController"; label.transform = CGAffineTransformMakeRotation(M_PI/2.0); [label setBackgroundColor:[UIColor redColor]]; label.frame = CGRectMake(0,0,20,480); [mpw addSubview:label]; } }
לא היה לי זמן לבדוק את קטעי הקוד הנ"ל אז אשמח שתדווח אם עבד לך ... שיהיה בהצלחה !