草庐IT

attempted

全部标签

ios - 警告 : Attempt to present * on * whose view is not in the window hierarchy - swift

我正在尝试呈现一个ViewController如果数据模型中有任何已保存的数据。但是我收到以下错误:Warning:Attempttopresent*on*whoseviewisnotinthewindowhierarchy"相关代码:overridefuncviewDidLoad(){super.viewDidLoad()loginButton.backgroundColor=UIColor.orangeColor()varrequest=NSFetchRequest(entityName:"UserData")request.returnsObjectsAsFaults=false

php - 在 Auth::attempt() Laravel 5.1 中禁用重定向

我使用Laravel创建RESTAPI。我在登录API中,所以我使用从Laravel构建的AuthController。但是,当我第一次使用Auth::attempt()验证用户登录时,我成功获取了用户信息,因为我调用了此方法Auth::user()。但是,当我第二次再次运行时,出现以下错误:NotFoundHttpExceptioninRouteCollection.phpline161:我知道如果用户已通过身份验证,它会自动发送重定向。并保存session。这是我在AuthController.php中的登录代码publicfunctiondemo(){if(Auth::attem

c++ - 带有 C++ 的 Lua 脚本 : attempt to index global 'io' (a nil value)

我打算使用luafoAI编写一个程序,所以我试图让它一起工作。但是当我尝试从我的cpp文件加载lua脚本时,我收到了这个错误消息:--toto.lua:1:attempttoindexglobal'io'(anilvalue)这是我的lua脚本:io.write("运行中",_VERSION,"\n")这是我的cpp文件:voidreport_errors(lua_State*L,intstatus){if(status!=0){std::cerr非常感谢。 最佳答案 你不应该直接调用luaopen_*函数。使用luaL_openl

c++ - Lua 5.2 问题 : 'attempt to call a nil value' from lua_pcall

我在获取从C++调用的Lua5.2函数时遇到问题。这是Luablock(名为test.lua):functiontestFunction()print"HelloWorld"end这是C++:intiErr=0;//Createaluastatelua_State*lua=luaL_newstate();//Loadiolibraryluaopen_io(lua);//loadthechunkwewanttoexecute(test.lua)iErr=luaL_loadfile(lua,"test.lua");if(iErr==0){printf("successfullyloaded

objective-c - 为什么我得到 "Attempt to mutate immutable object with replaceOccurrencesOfString:"当所有变量都是可变的

非常简单的代码,我可以说它在Xcode4.1中按预期工作,但在Xcode4.2中中断。这是有问题的代码:-(void)mergeDevData2Email:(NSMutableString*)targetcodeArray:(NSArray*)array1valueArray:(NSArray*)array2{NSUIntegern=0;for(NSMutableString*aCodeinarray1){if([array2count]>n){NSMutableString*arg=[array2objectAtIndex:(NSUInteger)n];NSLog(@"Targeti

ios - 警告 : Attempt to present <UIViewController: 0x74acff0> on <ViewController: 0x82b25a0> whose view is not in the window hierarchy

我是ObjectiveC编程的新手,我正在制作一个应用程序。我正在使用osx10.8.4和xcode4.6。我正在尝试(模态)在单View应用程序中从一个ViewController切换到另一个ViewController。我已经为segue提供了segue标识符,并在Storyboard中放置了一个segue。但是,当我尝试segue时,控制台会显示:Warning:Attempttopresentonwhoseviewisnotinthewindowhierarchy!这是我的第一个ViewController.m文件的代码(包含用于segue的代码):Viewcontroller

ios - 警告 : Attempt to dismiss from view controller <UINavigationController: 0xb359a20> while a presentation or dismiss is in progress

在我的应用程序中我正在做的是:rootViewController->pushViewController->pushViewController->pushViewController->presentModalViewController我想从presentModalViewController直接转到rootViewController。所以我所做的是:while(theViewController=[theObjectEnumeratornextObject]){if([theViewControllermodalTransitionStyle]==UIModalTransit

ios - sqlite ios : attempt to write a readonly database

我在项目中使用sqlite数据库。我可以执行SELECT之类的查询,但无法执行INSERT!在模拟器上,INSERT工作正常。一旦我在我的iPod上编译,就会出现这个错误信息:“attempttowriteareadonlydatabase”。以为是文件的权限我做了一个:chmod777mydatabase.sqlite但这并没有改变!我也试过按照我在其他网站上看到的那样,复制文件使用他的副本就可以了,但是没有用。你有解决办法吗?亲切地。PS:这是我的代码:for(NSDictionary*qinquotes){sqlite3_stmt*statement;sqlite3*contac

ios - [__NSPlaceholderArray initWithObjects :count:]: attempt to insert nil object from objects[0]

我让EAGLView存储presentFrameBuffer并保存来自EAGLView的屏幕截图,将此屏幕截图发送到UIViewController以用于UIActivityViewController社交网络框架。所以,我保存在NSUserDefaults中,然后在UIViewController中检索。但是由于未捕获的异常'NSInvalidArgumentException',我正在终止应用程序,原因:'***-[__NSPlaceholderArrayinitWithObjects:count:]:attempttoinsertnilobjectfromobjects[0]'/

objective-c - iOS/Objective-C : Attempting to Scan a string for substrings which will be assigned to multiple NSStrings

我正在尝试完成斯坦福iPhone编程(FA10)作业“FlickrFetcher”——到目前为止一切顺利,但我陷入了僵局:我已经成功地提取了“前100张”图片的位置,这些图片的格式为字符串“国家、州、城市”。我想创建两个NSString——一个是国家,另一个是州和城市。然后我可以从哪里做cell.textLabel.text=countryString;cell.detailTextLabel.text=stateCityString;在我的TableView数据源方法中。Fromresearchon计算器和AppleDocumentaion,NSScanner似乎是我最好的选择——这