Tag: ios6

操作无法完成。 (com.facebook.sdk错误2.)ios6

您好我正在使用ios6的Facebooklogin,我得到这个错误为本机popup 操作无法完成。 (com.facebook.sdk错误2) 这是使用的情景。 ( 我在simularor上运行这个 ) 我已经通过设置login到Facebook应用程序,我试图login到我的应用程序,它的工作正常。 然后,我从设置中注销了Facebook,并以不同的用户再次login。 然后我试图login到应用程序。 我得到这个错误。 我尝试使用该命令注销应用程序 [FBSession.activeSession closeAndClearTokenInformation]; 但没用。 Facebook应用程序中的包标识符与我的iOS应用程序中的相同。 这是我用来login的代码 NSArray *permissions = [[NSArray alloc] initWithObjects:@"email", nil]; [FBSession openActiveSessionWithReadPermissions:permissions allowLoginUI:YES completionHandler: ^(FBSession *session, FBSessionState state, NSError *error) { [self sessionStateChanged:session state:state error:error]; }]; 任何帮助表示赞赏。 这是我得到的错误 (com.facebook.sdk错误2.)“UserInfo = 0x9535330 {com.facebook.sdk:ErrorLoginFailedReason = com.facebook.sdk:SystemLoginDisallowedWithoutError, com.facebook.sdk:ErrorSessionKey =,expirationDate:(null),refreshDate:(null),attemptedRefreshDate:0001-12-30 00:00:00 +0000,permissions:(null)>} 注意我在另一个事件中得到了同样的错误。 那时候,这是我的代码中的一个错误 而不是作为许可 […]

preferredInterfaceOrientationForPresentation必须返回支持的接口方向

此错误没有任何意义,因为支持的方向返回首选方向UIInterfaceOrientationLandscapeRight //iOS6 -(BOOL)shouldAutorotate { return NO; } -(NSUInteger)supportedInterfaceOrientations { return (UIInterfaceOrientationLandscapeRight | UIInterfaceOrientationLandscapeLeft); } – (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { return UIInterfaceOrientationLandscapeRight; } 错误: 由于未捕获exception“UIApplicationInvalidInterfaceOrientation”而终止应用程序,原因是:“preferredInterfaceOrientationForPresentation必须返回支持的界面方向!

只有横向应用程序中的GameCenter身份validation会引发UIApplicationInvalidInterfaceOrientation

问题:如果用户没有login到GameCenter帐户 – GameCenter身份validation视图以纵向模式启动(在ios 5中有一个模式对话框)要求login。但是,如果我在xcode(项目摘要)或supportedInterfaceOrientationsForWindow禁用纵向模式: (因为我的应用程序应该只在横向模式下运行)我得到: 由于未捕获exception“UIApplicationInvalidInterfaceOrientation”而终止应用程序,原因:“支持的方向与应用程序没有共同的方向,并且shouldAutorotate返回YES” 如果我启用肖像的iPad / iPhone(和/或注释supportedInterfaceOrientationsForWindow :)它的工作原理没有崩溃,但我不想纵向模式启用。

如何切换到iPhone 5的不同Storyboard?

就像一个应用程序为iPad和iPhone使用不同的故事板一样,我希望我的应用程序为iPhone 5使用不同的故事板。由于Info.plist中没有select为iPhone 5select默认故事板的选项,我将如何以编程方式调用故事板? 我不想使用AutoLayout这个应用程序,除非它绝对是最后的手段。 我了解如何检测用户是否正在使用iPhone 5或具有相同屏幕尺寸的其他设备。 我只需要知道如何设置没有plist的默认情节串连图板。

iOS6 UDID – identifierForVendor具有优于identifierForAdvertising的优势吗?

苹果公司正在改变他们的隐私设置为iOS6和贬低设备的UUID(UDIDs)。 根据WWDC的演示文档和文档, UIDevice类中有两个UDIDreplace项: -identifierForVendor 来自同一开发人员的应用程序之间的ID相同。 删除该团队ID的最后一个应用。 备份。 -identifierForAdvertising 设备的独特之处 适用于所有应用程序; 用于广告 – iAd从iOS 6及更高版本的UDID转换而来。 使用“清除所有内容和设置”重置。 备份。 在我看来, -identifierForVendor不如-identifierForAdvertising因为它将在上次从供应商卸载应用程序时被重置,并通过“擦除所有内容和设置”被重置。 -identifierForVendor具有over -identifierForAdvertising优点吗?

为什么glReadPixels()在iOS 6.0的代码中失败?

以下是用于从OpenGL ES场景读取图像的代码: -(UIImage *)getImage{ GLint width; GLint height; glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &width); glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &height); NSLog(@"%d %d",width,height); NSInteger myDataLength = width * height * 4; // allocate array and read pixels into it. GLubyte *buffer = (GLubyte *) malloc(myDataLength); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); // gl renders "upside down" so swap top to bottom […]

iOS 6中的自动旋转具有奇怪的行为

我有UITabBarController应用程序播放video,并显示其他UITabBar选项卡中的其他信息。 在iOS 6 UIView旋转方法已被弃用,现在我需要使用shouldAutoRotate和supportedInterfaceOrientations方法。 对于video播放我使用MPMoviePlayerViewController 。 如何只旋转这个播放器视图? 我只能旋转整个应用程序,但不想这样做。 我介绍MPMoviePlayerViewController但它不像iOS 5和更早版本那样旋转。 在plist设置中,我只设置了1个人像界面方向。 如果我设置其他 – 整个应用程序将被旋转。

UIWebView:当应用程序进入后台时,HTML5audio会在iOS 6中暂停

美好的一天, 我的应用是一个音乐播放应用。 我用Javascript控制<audio> -Tag。 到目前为止没有问题,播放,暂停,下一个和上一个button正在工作。 当我待机iOS 5中的设备时,音乐继续播放,但自动下一首歌曲不起作用。 当它不在待机状态时,它可以工作。 而在iOS 6中,按下button后,音乐淡出。 锁屏上的播放/暂停button在iOS 5中运行,但在iOS 6中不能运行。

用GCDasynchronous下载UITableView的图像

我正在使用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(), […]