草庐IT

before_first_request

全部标签

ios - 无法加载网页,错误为 : The requested URL was not found on this server

我的PhoneGap应用程序遇到一个奇怪的错误:每次我运行模拟器(或我手机上测试部署的应用程序)时,我都会收到错误Failedtoloadwebpagewitherror:TherequestedURLwasnotfoundonthisserver.每次我运行模拟器时它都能正常工作。自从我第一次部署我的应用程序以来,这种情况一直在发生。当时我没有使用任何插件,但从那以后我一直在尝试让FacebookiOSSDK工作,这可能不相关但是我的应用程序实际成功启动的时间,我无法点击任何东西。上帝帮助我。这是我第一次构建iOS应用程序,所以这可能是新手犯的错误-在此之前我的应用程序只是一个移动网

iOS 8 : Remove sensitive information from views before moving to the background

在iOS7中,当应用程序进入后台时(通过订阅UIApplicationDidEnterBackgroundNotification),我的应用程序会显示一个身份验证屏幕。身份验证Controller删除了敏感信息,因此背景屏幕截图没有显示任何用户信息。在iOS8中,这不再有效。背景屏幕截图现在显示用户上次使用的View,而不是身份验证Controller......即使当应用程序返回前台时,身份验证Controller处于事件状态。我现在找到了解决方法。我可以使用name:UIApplicationWillResignActiveNotification而不是使用UIApplicati

ios - 'UIPopoverController' 已弃用 : first deprecated in iOS 9. 0

这个问题在这里已经有了答案:HowcanIfixthe"UIPopoverControllerisdeprecated"warning?(4个答案)关闭6年前。我开发了一个显示错误的项目:'UIPopoverController'isdeprecated:firstdeprecatediniOS9.0-UIPopoverControllerisdeprecated.PopoversarenowimplementedasUIViewControllerpresentations.UseamodalpresentationstyleofUIModalPresentationPopovera

iphone - Restkit Objective-C : Post request only works once

我正在使用Restkit与DrupalCMS进行通信。当我发送首先请求一切正常:我得到正确的JSON-字符串->太棒了。控制台是这样说的:2011-06-2423:00:48.344MyApp[1399:207]SendingPOSTrequesttoURLhttp://mysite.com/myproject/services/rest/service_views/get.json.HTTPBody:view_name=viewsname如果应用程序尝试再次发送相同的请求,则不会发生任何事情。没有任何委托(delegate)方法被调用。控制台说:2011-06-2423:03:40.

objective-c - iOS SDK : first advice for beginners

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于StackOverflow来说是偏离主题的,因为它们往往会吸引自以为是的答案和垃圾邮件。相反,describetheproblem以及迄今为止为解决该问题所做的工作。关闭9年前。Improvethisquestion我经常回答关于内存管理、UITableView、接口(interface)方向、MVC等基本主题的同类问题......我非常理解开始使用该SDK的每个人都对掌握它过于兴奋,但稍微阅读一下可以节省他们数小时的调试时间以及伴随“我们在这里遗

iphone - 从 google places API 获取数据后获取状态 "REQUEST_DENIED"

我做到了NSURLRequest*request=[NSURLRequestrequestWithURL:[NSURLURLWithString:@"https://maps.googleapis.com/maps/api/place/search/json?location=30.722322,76.76126&radius=500&types=food&sensor=true&key=any_apiKey"]];NSURLResponse*response;NSError*error;NSData*responseData=[NSURLConnectionsendSynchrono

ios - 在 NativeScript 中执行 XHR-Request 时出现 UICollectionViewFlowLayout 异常

我试图通过Xcode7对给定的API执行POST请求。我的错误是:thebehavioroftheUICollectionViewFlowLayoutisnotdefinedbecause:theitemheightmustbelessthantheheightoftheUICollectionViewminusthesectioninsetstopandbottomvalues,minusthecontentinsetstopandbottomvalues.TherelevantUICollectionViewFlowLayoutinstanceis,anditisattachedt

IOS 在不退出 First Responder 的情况下关闭/显示键盘

我的应用程序与通过蓝牙连接的条形码扫描器一起使用。连接扫描仪后,您可以双击扫描仪上的按钮以关闭/显示屏幕键盘。90%的时间用户会希望隐藏键盘,因为他们将扫描条形码以输入数据。有一些我提前知道需要启用键盘的异常(exception)情况,我想让他们省去按下扫描仪按钮调出键盘的工作,而是强制键盘出现。扫描仪不使用resignfirstseponder关闭键盘,这是显而易见的,因为光标仍然可见并且扫描条形码会将数据输入到当前文本字段中。有谁知道如何在不使用resignfirstresponder的情况下关闭/显示屏幕键盘?引用我正在使用这个扫描仪http://ww1.socketmobile

ios - AF 网络 2.0 : is it possible to put pure json in the body of a POST request?

我想从我的应用程序发出以下请求:AFHTTPRequestOperationManager*requestManager=[[AFHTTPRequestOperationManageralloc]init];requestManager.responseSerializer.acceptableContentTypes=[requestManager.responseSerializer.acceptableContentTypessetByAddingObject:@"application/json"];requestManager.requestSerializer=[AFJSO

ios - 错误域=com.alamofire.error.serialization.response 代码=-1011“请求失败 : bad request (400)

我正在使用AFnetworking库在服务器上发布数据。以下是我在服务器上发布数据的代码。-(void)callLoginAPI:(NSDictionary*)dictProfile{//1NSDictionary*params=[NSDictionarydictionaryWithObjectsAndKeys:[dictProfilevalueForKey:@"name"],@"username",[dictProfilevalueForKey:@"first_name"],@"first_name",[dictProfilevalueForKey:@"last_name"],@"l