ios4

iPhone App how to post Youtube video link using facebook graph Api

元气小坏坏 提交于 2019-12-24 00:18:17
问题 in iPhone App how to post Youtube video link using facebook graph Api to FaceBook Wall post? 回答1: You can try this : -(IBAction)postMeFeedButtonPressed:(id)sender { NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:4]; [variables setObject:@"#Your Message" forKey:@"message"]; [variables setObject:@"#http://Your Youtube Link" forKey:@"link"]; [variables setObject:@"#This is the bolded copy next to the image" forKey:@"name"]; [variables setObject:@"#This is the plain

How to Open Youtube video in MPMoviePlayerController and Play it

人走茶凉 提交于 2019-12-23 23:11:46
问题 i use this method before 1 time. but Now i can not get video from this URL that direct-play YouTube video in MPMoviePlayerController. URL = http://www.youtube.com/watch?v=JPUWNcGDyvM&feature=player_embedded - (void)viewDidLoad { player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.youtube.com/watch?v=JPUWNcGDyvM&feature=player_embedded"]]]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector

error in ASIFormDataRequest “_OBJC_CLASS_$_ASIFormDataRequest”, referenced from:

人盡茶涼 提交于 2019-12-23 19:20:27
问题 I am struggling in ASIFormDataRequest. I want to upload a photo on facebook in iphone so that I used a ASIFormDataRequest in my programming but it give me error like _OBJC_CLASS_$_ASIFormDataRequest , referenced from: I don't understand its meaning and how can I handle it My code for uploading photo is as follows: -(void)postphoto:(id)sender { UISegmentedControl* _segControl; //ASIFormDataRequest *request; UIImageView *_imageView = [UIImageView alloc];// initWithImage: image]; NSString

ios5 background management different from ios4?

折月煮酒 提交于 2019-12-23 19:11:20
问题 I need to make some url request when my application goes to background I'm developing with the simulator and I've just noticed that when I press the power button to lock the screen the appDelegate method - (void)applicationDidEnterBackground:(UIApplication *)application with iOS 5 is automatically called, but this doesn't happen with iOS 4 is it right? can someone try if on real devices there's the same result? is it possible to detect the power button pressure and differentiate the actions

NSURLConnection delegate methods not executing

白昼怎懂夜的黑 提交于 2019-12-23 18:40:15
问题 I'm running the following example code from Apple - NSString *requestURL = [[NSString alloc] initWithString:@"http://google.com/"]; NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:requestURL] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if(theConnection) { NSLog(@"The connection has started..."); } else { NSLog(@"Connection has failed...");

iPhone SDK - API for orkut

送分小仙女□ 提交于 2019-12-23 18:38:31
问题 I have worked in retrieving the contacts information from Google contacts in iPhone using gData library. Similarly I gonna work with Orkut. Is there any library available for Orkut like gData? If so, provide me the link. Thanks in advance. 回答1: For orkut we have the orkut client. Unfortunatly there is not a iOS version of the orkut client, and there is not docs for the API calls as gData have. Google provided just the Java client, and the community built the PHP, QT and .NET clients by

How do I get a GKPlayer's status from Game Center?

那年仲夏 提交于 2019-12-23 16:11:19
问题 When I get a GKLocalPlayer or use loadPlayersForIdentifiers:identifiers withCompletionHandler: to get a list or individual GKPlayer aliases, the GKPlayer object when logged, looks something like this: 2010-09-23 10:39:01.759 Cee-lo[76500:207] Players loaded by identity: ( "<GKPlayer 0x84125a0>(playerID: G:1234567890, alias: typeonetester1, status: Adding test friends., rid:(null))", "<GKPlayer 0x8412530>(playerID: G:1234567890, alias: typeonetester2, status: Adding Game Center to app, rid:

How to get parent navigation controller in UIView

ぃ、小莉子 提交于 2019-12-23 15:36:15
问题 I have created a UITabBarController in my app delegate. where each tab bar item holds a different UINavigationController that loads a custom UIViewController with a NIB (using -pushViewController: ). Inside one of the navigation controller, I load a custom UIView class with a custom NIB also. This view is loaded multiple times inside the UIViewController . The custom UIView has a UIButton , that on the event of touching it, I want to push a new UIViewController on the stack. Problem is that I

AVPlayer Questions, while Live Streaming (iOS)

怎甘沉沦 提交于 2019-12-23 13:11:12
问题 I have AVPlayer Questions. 1.How to control the volume of it? 2.How to know if the AVPlayer is reloading music because bad connection, do i have some inidication of it? 回答1: AVPlayer uses the system volume, so if you need to provide controls for this you can use MPVolumeView which gives you the slider for volume control. For audio fading, you can use an AVAudioMix . Here's some code: //given an AVAsset called asset... AVPlayerItem *playerItem = [AVPlayerItem playerItemWithAsset:asset]; id

How and where would you use instantiateViewControllerWithIdentifier

可紊 提交于 2019-12-23 13:01:19
问题 UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil]; MenuScreenViewController *controller = (MenuScreenViewController*)[mainStoryboard instantiateViewControllerWithIdentifier: @"<Controller ID>"]; Where exactly do i write this code if i have to make sure that the current view is instantiated with the identifier? Which means if i write any code on this class it has to appear when this viewcontroller loads? Also how would i use it? I dont want to