问题标签 [back]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
iphone - 在基于导航的 iPhone 应用程序上隐藏后退按钮失败
ViewWillAppear
我的问题是,如果我的网络请求在触发之前或之后不久没有完成,则后退按钮将不会恢复其可见性。
我有一个基于导航的 iPhone 4.0 应用程序,它使用了简单的 Root 和 Detail 视图设置。我正在处理从 web 服务返回的数据,所以当我在其ViewDidLoad
函数中推送我的详细视图时,我在单独的线程中调用我的 web 服务方法,并且 Iphone 生命周期在主线程上执行它的操作。我必须禁用/隐藏后退按钮,直到 Web 请求完成(或失败),所以我调用self.navigationItem.hidesBackButton = YES;
ViewDidLoad 和self.navigationItem.hidesBackButton = NO;
委托函数,一旦我的 Web 请求完成或失败就会触发。
我已经尝试了以下方法:
根视图控制器推送代码:
详情查看控制器代码:
任何帮助都非常感谢我几乎不能@#$&^ 相信在 UI 中隐藏一个按钮会导致我浪费这么多时间。
android - Android Activity with splash screen restart and the back button mystery
I have an Android app with a splash screen.
This splash screen pre-loads data and when finished starts the application's main activity and finishes (through a finish() call).
This works quite well as long as the application is not totally killed. So, I can usually switch back and forth between different tasks as usual: when I leave the app from a sub activity and return soon after I will be presented with this sub activity.
Now, when I leave this sub activity and do some other stuff for a while inevitably this application process is killed by the OS.
No problem so far. Now I would expect Android, being unaware of my preloading (if the data was not preloaded it would just take longer or not display some fonts, but Android cannot be aware of the fact that I am doing preloading somewhere), to restore the sub activity from a Bundle. However the splash screen activity is started.
So, I say, that's fine then... the splash screen activity is after all the launcher / main activity. Now, the actual mystery I have is as follows.
When I press the back-button from this newly loaded splash screen I will be presented with the sub activity I left the application from before it got killed. I really don't understand this. Apparently Android DID save the sub activity's state (and its history stack) to be reloaded but instead of reloading it chose to start the splash screen instead, with this sub activity (I left the task earlier before it got killed) one step back on the activity stack.
Why does this happen?
When the process is not killed I can switch back to where I left off. When it's killed I cannot (yet still have the whole earlier history of that app restored). I know that Android has to load state etc. in the latter case, but that shouldn't be a problem and is performed automatically by default (according to the docs).
P.S. I am not doing anything fancy. Default launch flags, no overwritten state restore methods etc.
iphone - UINavigationContlrol 不弹出视图
我知道关于它的问题很少,但没有一个得到回答。
我的应用程序中有一个导航控制器。推送视图正常工作。按下后,后退按钮也是可见的,但是当我按下后退按钮时,它不会弹出视图,只会将导航栏的视图更改为预览的视图导航栏。
希望现在有人有答案。
提前致谢。
button - Appcelerator 在关闭窗口时出现黑屏
问候,
我正在使用 appcelerator 开发一些应用程序,但遇到了一些问题。
每次我关闭基本窗口时,我都会遇到一些黑屏。如何在不按两次 Android 后退按钮的情况下退出应用程序?
提前谢谢了,
android - 通过单击按钮返回到android中的主菜单
在 android 中,我的应用程序提供了一个按钮,用户可以单击该按钮将它们返回到应用程序打开时出现的屏幕(onCreate)。
如何设置该按钮以使用户返回主菜单?
我在 switch 语句中有这样的东西(点击时):
return_main 是按钮的 id ......我知道这是不对的,但我想不出任何其他方式。
谢谢!
android - 使用相机快照防止多个活动堆叠
我已经阅读了finish();
命令和FLAG_ACTIVITY_CLEAR_TOP
命令,还查看了 Common Ware 关于杀死应用程序的答案,但我不确定如何将其放入我的应用程序中。
基本上,我有一个用户单击一个将他们带到相机的按钮。然后,用户拍摄照片并将它们带到布局视图。然后,用户单击一个按钮,根据某些条件将他们带到 2 个视图之一。
然后允许用户重新拍摄照片,或进入主菜单(取决于)。我的问题是,如果用户返回主菜单,然后捕捉另一个,然后是另一个,等等......活动堆栈,所以当我单击“主菜单”按钮时,应用程序会返回每个堆栈活动,直到最后它返回主菜单。有没有办法用这些行之一杀死每个活动,所以即使用户重新拍摄照片,他们也只需要返回一次即可进入主菜单?
谢谢你的帮助。
android - Android Google Maps 磁贴未在“返回”按钮单击时加载
我有一个使用谷歌地图的安卓应用程序。我的第一个活动开始一个带有一些可点击图标的地图视图。单击图标时,将使用不同的地图启动新的活动(意图)。然后从新地图中单击返回按钮,这会将我带回到我的第一张地图。但是,当我开始在地图中缩放或移动时,只会显示最初加载的图块。我怎样才能改变这个?
如果您更改手机方向,地图将刷新,然后它会正常运行(因为应用程序重新启动)所以我添加了 android:configChanges="orientation" 以停止重新启动方向更改。我补充说,因为我不想再次重新加载所有标记(使用 Web 服务并且可能需要一些时间)。
我只想在单击“返回”到原始地图时加载图块。有任何想法吗?
uitextfield - iphone ipad更改文本字段颜色
请问,如何更改文本字段背景的颜色和占位符的颜色?我看到了这个答案
在堆栈中,更改 bkgrnd 但不清楚在哪里调用它
我应该覆盖 UITextField.h 吗?在哪里?或者我应该在哪里改变颜色?
并用于更改占位符,但它不起作用! 堆栈,更改持有人。
android - 带有多个 (2) 网页视图的后退按钮
我正在玩一个在tabhost/tabwidget
布局中设置了 2 个 web 视图的应用程序,我的问题是我不知道如何让它们导航回页面历史记录,至少对于它们两者而言。我可以为第一个 webview ( webview1
) 执行此操作,但我不知道如何为第二个选项卡中的第二个执行此操作。
sql-server - 备份没有全文目录的 SQL Server 2008 DB
我正在尝试备份没有全文目录的 SQL Server 2008 数据库。我尝试在备份之前删除全文目录和索引,如下所示:
它说所有命令都已成功执行,但是,当我进行备份时,我仍然会在备份中获得全文文件:
结果是