हैलो मेरे पास वेबव्यू के साथ ऐप है और मैं यूट्यूब वीडियो एम्बेड करता हूं। अब मेरे पास आईओएस 6 स्थापित है लेकिन वे अब और काम नहीं करते हैं।आईओएस 6 एम्बेड यूट्यूब
क्या किसी को पहले ही समाधान मिल गया है?
mycode:
- (void)viewDidLoad
{
[scrollvideoView setScrollEnabled:YES];
[scrollvideoView setContentSize:CGSizeMake(320,2300)];
[scrollvideoView setPagingEnabled:NO];
[super viewDidLoad];
// Do any additional setup after loading the view.
//Variabelen
NSInteger x1 = 25;
NSInteger x2 = 123;
NSInteger x3 = 220;
NSInteger sz = 75;
//Label height rij1
NSInteger yt1 = 45;
/* de Videos */
//Eerste rij
NSInteger y1 = 0;
[self embedYouTube:@"http://www.youtube.com/watch?v=MFARZYEGqK8" frame:CGRectMake(x1, y1, sz, sz)];
[self embedYouTube:@"http://www.youtube.com/watch?v=cD7WHGvXqEA" frame:CGRectMake(x2, y1, sz, sz)];
[self embedYouTube:@"http://www.youtube.com/watch?v=8onqmHPBJOo" frame:CGRectMake(x3, y1, sz, sz)];
//Setting de labels
UILabel *videoLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(x1, yt1, sz, sz)];
videoLabel1.text = @"Videoclip daor heb ik schijt an";
[self.scrollvideoView addSubview:videoLabel1];
videoLabel1.backgroundColor = [UIColor clearColor];
videoLabel1.font = [UIFont fontWithName:@"Arial" size: 9.0];
videoLabel1.textColor = [UIColor whiteColor];
UILabel *videoLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(x2, yt1, sz, sz)];
videoLabel2.text = @"Videoclip goeie been verkeerde bed";
[self.scrollvideoView addSubview:videoLabel2];
videoLabel2.backgroundColor = [UIColor clearColor];
videoLabel2.font = [UIFont fontWithName:@"Arial" size: 9.0];
videoLabel2.textColor = [UIColor whiteColor];
UILabel *videoLabel3 = [[UILabel alloc] initWithFrame:CGRectMake(x3, yt1, sz, sz)];
videoLabel3.text = @"Wavin flag (giel beelen)";
[self.scrollvideoView addSubview:videoLabel3];
videoLabel3.backgroundColor = [UIColor clearColor];
videoLabel3.font = [UIFont fontWithName:@"Arial" size: 9.0];
videoLabel3.textColor = [UIColor whiteColor];
//Tweede rij
NSInteger y2 = 100;
[self embedYouTube:@"http://www.youtube.com/watch?v=-cJz3YGRlMI" frame:CGRectMake(x1, y2, sz, sz)];
[self embedYouTube:@"http://www.youtube.com/watch?v=ZdQRcAnPCvk" frame:CGRectMake(x2, y2, sz, sz)];
[self embedYouTube:@"http://www.youtube.com/watch?v=KNcT5O1qk40" frame:CGRectMake(x3, y2, sz, sz)];
}
- (void)embedYouTube:(NSString *)urlString frame:(CGRect)frame {`
/*NSString *embedHTML = @"\
<html><head>\
<style type=\"text/css\">\
body {\
background-color: transparent;\
color: white;\
}\
</style>\
</head><body style=\"margin:0\">\
<embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \
width=\"%0.0f\" height=\"%0.0f\"></embed>\
</body></html>";
NSString *html = [NSString stringWithFormat:embedHTML, urlString, frame.size.width,`frame.size.height];
UIWebView *videoView = [[UIWebView alloc] initWithFrame:frame];
[videoView loadHTMLString:html baseURL:nil];
[self.scrollvideoView addSubview:videoView];
//[videoView release];
}
आईओएस 6 की रिहाई टिप्पणी इसमें एक नोट इस बारे में है पढ़ें। –
ऐप्पल ने मूल यूट्यूब ऐप को हटा दिया, जो वास्तव में पिछले आईओएस में यूट्यूब वीडियो चलाने में शामिल था। मैं एक प्रतिस्थापन खोजने की कोशिश कर रहा हूं, अभी तक कोई भाग्य नहीं है। –
क्या आपने इसे हल किया था? – Daniel