草庐IT

when_all

全部标签

iOS 和 Mopub : app freezes when loading ad on a slow network

如入门指南中所述,我的代码如下所示,请参阅链接:http://help.mopub.com/customer/portal/articles/82831-start-guide-(void)viewDidLoad{self.adView=[[MPAdViewalloc]initWithAdUnitId:@"xxx"size:MOPUB_BANNER_SIZE];self.adView.delegate=self;self.adView.frame=CGRectMake(0,self.view.bounds.size.height-MOPUB_BANNER_SIZE.height,MOP

ios - AFJSONRequestOperation : variable 'operation' is uninitialized when captured by block

我在第6行的这段代码中收到上述警告,并且userInfo在该block中也变为nil。请提出一些建议来消除此警告和userInfo问题。AFHTTPClient*httpClient=[[AFHTTPClientalloc]initWithBaseURL:[NSURLURLWithString:@"someurl"]];[httpClientregisterHTTPOperationClass:[AFJSONRequestOperationclass]];[httpClientsetParameterEncoding:AFJSONParameterEncoding];[httpClie

ios - iPhone 'UISplitViewController is only supported when running under UIUserInterfaceIdiomPad'

我有一个UITableView,有行,当你点击每一行时你会看到详细View,我想要这个用于iPhone,如果我旋转设备并从列表中选择我的行,我必须查看描述。(我的意思是在左边我必须有我的行,在右边我的详细View)将设备旋转回垂直并隐藏详细View.我使用了splitViewController,但是我有一个错误,请你检查我的代码并让我知道这里有什么问题吗?提前致谢!这是代码-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions{se

ios - 如何继续绘制Rect : when finger on screen

我有当前代码:-(void)touchesMoved:(NSSet*)toucheswithEvent:(UIEvent*)event{self.objectPoint=[[touchesanyObject]locationInView:self];floatx,y;if(self.objectPoint.x>self.objectPoint.x){x=self.objectPoint.x+1;}elsex=self.objectPoint.x-1;if(self.fingerPoint.y>self.objectPoint.y){y=self.objectPoint.y+1;}els

ios - NSUndoManager : revert all the functionality of method

我搜索了很多,但无法获得有关我想要的内容的更多详细信息。是否有可能在NSUndoManager类的帮助下反转任何方法执行的所有功能。例如:假设我正在从TableView中删除任何行或从该方法的父View中删除任何subview。我可以在NSUndoManager的帮助下扭转这些事情吗?NSUndoManager的prepareWithInvocationTarget方法是否对此有帮助?任何帮助将不胜感激。提前致谢!!! 最佳答案 这份文件有所有的答案!IntroductiontoUndoArchitecture

ios - SpriteKit : Label 'jumps' when text changes

我有一个标签,显示自玩家第一次触摸屏幕以来我的游戏已经过去的时间。它显示秒和毫秒。我使用将它定位在框架的中间CGPointMake(CGRectGetMidX(self.frame)问题是,并非所有数字都具有相同的宽度(例如,1小于3)。这导致我的标签在毫秒更新时从左到右快速跳转一两个像素。因为标签大小每次都明显增加和减少,所以我的标签的MidX坐标发生变化并导致我的标签移动。我希望它始终保持在同一位置。有谁知道阻止它移动的解决方案吗?编辑:标签代码-(SKLabelNode*)timeLabel{timeLabel=[[SKLabelNodealloc]initWithFontNam

IOS 应用程序无线分发 : error when download can't connect to domain

我们目前正在IOS和Android上无线部署一个新的应用程序,android可以通过一个简单的链接在互联网上下载一个apk没有问题,但是在IOS上我们目前遇到了一个问题,当我们尝试从下载链接。“无法连接到“domain.com””我不知道出了什么问题:plist和ipa都很好,我用我的浏览器检查了所有链接。plist和ipa的MIME类型是:plist:文本/xmlipa:应用程序/八位字节流https://端口自定义为8443https://domain.com:8443/webapp/app.html下载链接:DownLoadIphoneAPP像这样的plist文件:itemsas

iOS,核心数据 : set argument is not an NSSet error when counting an NSSet

当列出相同的tableView时,有时会发生这种错误,我的意思是有时是,有时不是。当我尝试检查检索到的NSSet是否包含任何对象时:if(coin.dublicates.count>0)我得到错误:***-[NSMutableSetunionSet:]:setargumentisnotanNSSet'出现这种错误的原因是什么?整个方法列表:if(period.regions.count==0){for(Nominal*nominalinperiod.nominals){if(nominal.coins.count>0){counter+=[[nominal.coinsfilteredS

ios - SKMaps.框架 : code object is not signed at all

.Frameworks/SKMaps.framework:invalidresourcespecificationrule(s)Command/usr/bin/codesignfailedwithexitcode1Theerrorisrelatedto:codeobjectisnotsignedatall.同样的错误发生在SwiftSKMapsSwiftDemo上。我使用的是Xcode6.3、OSX10.10.3和iOS8.3,但我也尝试过Xcode6.1、OSX10.9.5和iOS8.1.3。将脚本添加为--deep无法解决问题。为SKMaps.framework目标框架激活代码登录

IOS 游戏中心 : How to know when default sign in form for game center is finished?

我想知道如何知道用户何时完成GameCenter登录表单。我正在自动登录Facebook,但我需要等待GameCenter登录完成。有什么方法可以知道吗?-(void)authenticateLocalPlayer{GKLocalPlayer*localPlayer=[GKLocalPlayerlocalPlayer];localPlayer.authenticateHandler=^(UIViewController*viewController,NSError*error){[selfsetLastError:error];if(localPlayer.authenticated)