我想要Facebook app native dialog login ( https://developers.facebook.com/docs/technical-guides/iossdk/login/#fbnative )。 在控制台中,当点击FBLoginView时,我收到以下消息: FBSDKLog: Cannot use the Facebook app or Safari to authorize, fb**** is not registered as a URL Scheme 然而,我完全按照这样做: 没有更新Facebook SDK到3.5后打开活动会话
我有UITabBarController应用程序播放video,并显示其他UITabBar选项卡中的其他信息。 在iOS 6 UIView旋转方法已被弃用,现在我需要使用shouldAutoRotate和supportedInterfaceOrientations方法。 对于video播放我使用MPMoviePlayerViewController 。 如何只旋转这个播放器视图? 我只能旋转整个应用程序,但不想这样做。 我介绍MPMoviePlayerViewController但它不像iOS 5和更早版本那样旋转。 在plist设置中,我只设置了1个人像界面方向。 如果我设置其他 – 整个应用程序将被旋转。
在iOS 6之前,像这样打开一个URL会打开(Google)地图应用程序: NSURL *url = [NSURL URLWithString:@"http://maps.google.com/?q=New+York"]; [[UIApplication sharedApplication] openURL:url]; 现在,随着新的苹果地图的实施,这只是打开移动Safari到谷歌地图。 我怎样才能完成与iOS 6相同的行为? 我如何以编程方式打开地图应用程序,并指向特定的位置/地址/search/什么?
我给了一个应用程序说10视图控制器。 我使用导航控制器加载/卸载它们。 除了一个以外,都是以肖像模式。 假设第七个VC在横向。 当它被加载时,我需要它在横向上呈现。 请build议一种方法来强制在iOS 6中从纵向到横向的方向 (在IOS 5中工作也是一件好事)。 这是我在 IOS 6 之前的工作方式 : – (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; UIViewController *c = [[[UIViewController alloc]init] autorelease]; [self presentModalViewController:c animated:NO]; [self dismissModalViewControllerAnimated:NO]; } – (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ return (interfaceOrientation == UIInterfaceOrientationPortrait); } 呈现和解散模式风险投资者迫使应用程序审查其方向,所以shouldAutorotateToInterfaceOrientation被调用。 我已经在iOS 6中尝试过了: – (BOOL)shouldAutorotate{ return YES; } -(NSUInteger)supportedInterfaceOrientations{ return UIInterfaceOrientationMaskLandscape; } – (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{ return UIInterfaceOrientationLandscapeLeft; } […]
在iOS 6 shouldAutorotateToInterfaceOrientation不起作用,但在iOS 5.0或5.1可以正常工作。 我需要在iOS 6进行更改。 这是我的代码 – (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if([[[SampleApplicationAppDelegate instance].callInfoDictionary valueForKey:IS_CHAT] isEqualToString:NO_RESPONSE]) { int nAngle = 0; BOOL bRet = NO; switch (interfaceOrientation) { case UIInterfaceOrientationPortrait: nAngle = 90; bRet = YES; NSLog(@"…….Preview = %f %f",_previewCamera.frame.size.width,_previewCamera.frame.size.height); _previewCamera.transform = CGAffineTransformMakeRotation(M_PI*1.5); NSLog(@"Preview = %f %f",_previewCamera.frame.size.width,_previewCamera.frame.size.height); break; case UIInterfaceOrientationPortraitUpsideDown: nAngle = 270; bRet = YES; _previewCamera.transform […]
什么是利用iOS 6新的自动布局function的最佳方式,同时还能在早期版本的iOS上提供旧设备的兼容性?
即时通讯使用Xcode 4.5(4G182)与iOS 6. NSDateFormatter在iOS 6显示错误的一年,如何解决? NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; [dateFormatter setDateFormat:@"YYYY-MM-dd"]; NSString *str = [dateFormatter stringFromDate:[NSDate date]]; NSLog(@"%@ == %@",str,[[dateFormatter dateFromString:str] description]); 打印出“2012-09-14 == 2011-09-13 16:00:00 +0000”
美好的一天, 我的应用是一个音乐播放应用。 我用Javascript控制<audio> -Tag。 到目前为止没有问题,播放,暂停,下一个和上一个button正在工作。 当我待机iOS 5中的设备时,音乐继续播放,但自动下一首歌曲不起作用。 当它不在待机状态时,它可以工作。 而在iOS 6中,按下button后,音乐淡出。 locking屏幕上的播放/暂停button在iOS 5中运行,但不在iOS 6中运行。
我升级了Xcode版本,当使用外部静态库时,我得到这个消息: ld:文件是通用的(3片),但不包含(n)armv7s片断:/ file / location用于架构armv7s clang:错误:linker命令失败,退出代码1(使用-v来查看调用) 如果图书馆的开发者还没有更新他们的图书馆,是否有任何方法可以绕过这一点,并添加对图书馆的支持?
我正在使用GCDasynchronous下载我的uitableview的图像,但是存在一个问题 – 滚动图像闪烁并且一直改变。 我试图设置图像与每个细胞零,但没有多大帮助。 当快速滚动时,所有图像都是错误的。 我能做些什么? 这是我的单元格的方法: – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; if (self.loader.parsedData[indexPath.row] != nil) { cell.imageView.image = nil; dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul); dispatch_async(queue, ^(void) { NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:[self.loader.parsedData[indexPath.row] objectForKey:@"imageLR"]]]; UIImage* image = [[UIImage alloc] initWithData:imageData]; dispatch_async(dispatch_get_main_queue(), […]