Tag: 冻结

UIImagePickerController当相机翻转时冻结

我的UIImagePickerController冻结,相机closures,当button从前到后翻转相机被按下。 这是我如何初始化项目中的图像select器控制器对象(其余代码已被省略),因为它与UIimagepickercontroller对象无关。 //In my .h file UIImagePickerController * imgPicker; //in my .m file -(void)viewDidLoad { imgPicker = [[UIImagePickerController alloc] init]; imgPicker.delegate = self; imgPicker.allowsEditing = YES; } -(void) takePicture { imgPicker.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentViewController:imgPicker animated:YES completion:NULL]; } -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { masterImage.image = [info objectForKey:UIImagePickerControllerEditedImage]; if(masterImage.image == nil) { masterImage.image = [info objectForKey:UIImagePickerControllerEditedImage]; […]

当有很多使用阴影的UILabels运行的UIViewanimation时,设备会冻结,然后按Homebutton

我在应用程序中遇到了一些问题。 当我在屏幕上有很多图标(UIViews),每个运行一个animation时发生错误。 该屏幕提醒跳板屏幕,并且animation视觉也相似。 所以,如果我按主页button,应用程序不会去背景,我什么都不能做。 即使电源button不起作用。 图标继续晃动。 如果我删除了标签创build方法的调用,则不会发生这种情况。 有什么build议? 谢谢! animation方法(从Three20 api中提取): – (void)wobble { static BOOL wobblesLeft = NO; if (isEditing) { CGFloat rotation = (kWobbleRadians * M_PI) / 180.0; CGAffineTransform wobbleLeft = CGAffineTransformMakeRotation(rotation); CGAffineTransform wobbleRight = CGAffineTransformMakeRotation(-rotation); [UIView beginAnimations:nil context:nil]; NSInteger i = 0; NSInteger nWobblyButtons = 0; for(Icon *ic in iconList) { ++nWobblyButtons; […]

iAd冻结了Sprite Kit应用程序

我发现点击iAds可以冻结任何Sprite Kit游戏的屏幕。 这不只是我的具体项目,因为股票的Sprite Kit示例项目也冻结与iAd。 尽pipe这在模拟器中不会发生! 我不能决定是否是因为模拟器运行iOS 8,而我的实际testing设备是7.1,或者是因为模拟器只是一个模拟器,所以它做的事情不同。 所以,如果你点击iAd,然后点击iAd中的链接去Safari浏览器(或者手动切换到任何应用程序),然后切换回Sprite Kit应用程序,应用程序被冻结。 iAd横幅广告仍处于运行状态,它会根据广告的预期方式加载广告。 但其他应用程序被冻结。 或者具体来说,它仍然接受触摸和东西(我可以从NSLog看到),但节点的渲染被冻结。 如果你点击它再次打开iAd,并closuresiAd,那么应用程序会以某种方式恢复,并且再次正常工作。 如果您好奇,这里是我对股票Sprite Kit示例项目所作的唯一修改: // in GameViewController.h #import <iAd/iAd.h> @interface GameViewController : UIViewController <ADBannerViewDelegate> @end // in GameViewController.m @interface GameViewController() { ADBannerView* iAdBanner; NSLayoutConstraint* centerAd; } @end @implementation GameViewController – (void)viewDidLoad { [super viewDidLoad]; // Configure iAd iAdBanner = [[ADBannerView alloc] initWithFrame:CGRectZero]; iAdBanner.alpha = […]

iOS的swift:generateCGImagesAsynchronouslyForTimes需要太长时间,冻结应用程序?

我使用以下代码asynchronous获取video缩略图: let imgGenerator = AVAssetImageGenerator(asset: asset) imgGenerator.generateCGImagesAsynchronouslyForTimes([NSValue(CMTime: CMTimeMake(1, 30))]) {(time1, image, time2, result, error) -> Void in if (result == .Succeeded) { dispatch_async(dispatch_get_main_queue()) { thumbnailImageView.image = UIImage(CGImage: image!) } NSLog("SUCCESS!") } } 我不明白为什么它冻结的应用程序,但例如,如果我用这20个tableview单元格需要超过20秒加载和应用程序不会继续和显示视图完成下载之前。 为什么我在这里失踪?

iOS的Javascript DOM“冻结?”

这里有几个问题: 反正有没有让iOS冻结在页面上的JavaScript滚动? 当你在另一个选项卡或者如果你切换应用程序时,iOS会冻结JavaScript吗? iOS上还有其他主要的JavaScript限制吗?

应用程序冻结在ios 8时推或popup

我的应用程序有一个大问题。 主要在iOS 8上,因为我们还没有在其他iOS版本上find这个。 当推送到新的视图控制器或popup到先前的视图控制器时,它有时会冻结。 但奇怪的是,如果你按Home键并从后台启动应用程序。 它会运行一点。 在这里,我的意思是新推或弹​​出视图控制器出现,但你仍然无法推动或popup新的视图控制器。 更新:当应用程序冻结时,内存,CPU和磁盘使用情况都是正常的。

魔法logging – 取主线程块ui,在后台返回nil

我是新来的魔法logging,但已经看到了一些问题上的计算器,并找不到我的问题的答案。 我必须使用这种types的构造来查找具有谓词的项目: NSArray *result = [MOSomeItems MR_findAllWithPredicate:predicate]; 在主线程结果返回一些值,但UI是冻结。 当使用这个构造时,结果返回零值: dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ NSArray *result = [MOSomeItems MR_findAllWithPredicate:predicate]; }); 在后台获取数据的最佳做法是什么?

CGFontCreateWithDataProvider以飞行模式挂起

当我在飞行模式下调用CGFontCreateWithDataProvider 时 ,我的应用程序将冻结。 不在飞行模式,它工作正常。 字体存储在设备上,不应该发生networking访问。 在调用此方法加载本地字体文件时: [self registerIconFontWithURL:[[NSBundle mainBundle] URLForResource:@"FontAwesome" withExtension:@"otf"]]; url的值如下: file:///var/mobile/Applications/48D3DA14-235B-4450-A081-7A6BA6116667/Blah.app/FontAwesome.otf + (void)registerIconFontWithURL:(NSURL *)url { NSAssert([[NSFileManager defaultManager] fileExistsAtPath:[url path]], @"Font file doesn't exist"); CGDataProviderRef fontDataProvider = CGDataProviderCreateWithURL((__bridge CFURLRef)url); //******Freezes after the next line****** CGFontRef newFont = CGFontCreateWithDataProvider(fontDataProvider); //******FROZEN****** CGDataProviderRelease(fontDataProvider); CFErrorRef error; CTFontManagerRegisterGraphicsFont(newFont, &error); CGFontRelease(newFont); } iOS 7.1.x,iPhone 5。 我不知道为什么会发生这种情况,并没有find任何帮助。 有没有人有一个线索为什么会发生这种情况? 提前致谢!