问题标签 [uikeycommand]
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.
ios - iOS模拟器中的命令键
iOS 模拟器快捷键经常使用命令键。我注意到在模拟器中运行时,在我的程序中尝试捕获 command-z、command-y 等不起作用。我认为原因是系统将它们解释为模拟器命令,而不是传递给我的 iOS 应用程序的按键。
有没有办法改变这种行为?
ios - UISplitviewController and different UIKeyCommands depending on master, detail or both being on screen
I want to include some UIKeyCommands
in my app. My app consists of one UISplitViewController
that forces the master to be always visible on iPad full screen. On smaller screen it works like it normally would.
Now, I've implemented some UIKeyCommands
in the MasterViewController
and some in the DetailViewController
. However, the app will only show those in DetailViewController
. So I put all of them in the RootSplitViewController
, but that will show all of them, even when the MasterViewController
is hidden in iOS 9's splitview.
What I want though, is for it to show all when the app is fullscreen on iPad and thus the MasterViewController
is forced on screen together with the DetailViewController
. And when the view is small (ie 50-50) and the MasterViewController
is hidden, I want it to only show those of the window that's on screen.
Any ideas on how to achieve this?
cocoa-touch - UIKeyCommand 箭头键输入不起作用
我有其他 UIKeyCommand 正常工作,但是箭头键(使用 UIKeyInput[Direction]Arrow 常量)选择器没有被调用。任何建议将不胜感激。
这是我用来创建箭头键命令的代码:
选择moveRight
器没有被调用,也没有任何箭头键选择器。除箭头键外,其他 UIKeyCommands 都按预期工作。
ios - iOS Swift keyCommands 仅读取数字
请考虑以下代码:
出于某种原因,只有数字被读取。这适用于模拟键盘的蓝牙条形码扫描仪。keyCommands 不能读取字母字符还是我做错了什么?
objective-c - 如何使用 UIKeyCommand
当用户按下硬件键盘上的向下箭头时,我试图在表格视图中选择一行。现在,我只是想打印一个日志,我似乎无法让它工作。根据其他类似问题的答案,这是我到目前为止所拥有的:
感谢所有帮助!
swift - 如何拦截swift iOS应用程序的关键事件?
我删除了@UIApplicationMain
inAppDelegate.swift
并写了main.swift
如下,但程序仍然无法触发keyPressed
功能。但执行print("send event2")
每个按键。
如何开火keyPressed
功能?这个程序有问题吗?
ios - iOS 使用箭头键导航 TableView
如何使用箭头键(物理键盘)导航 UITableView,就像 iOS 10 中引入的聚光灯行为一样?
希望让用户在搜索框中输入内容并使用向上/向下箭头突出显示表格视图中的一行,然后按回车键选择该行。
我还没有找到有关该主题的任何资源。
请提供 Swift 中的示例代码。
ios - 停止 UIKeyCommand 重复动作
如果注册了一个键盘命令,如果用户按住该键的时间过长,它的操作可能会被调用很多次。这会产生非常奇怪的效果,例如 ⌘N 可以多次重复打开新视图。有没有简单的方法来阻止这种行为,而无需诉诸诸如布尔“已触发”标志之类的东西?
以下是我注册两个不同键命令的方法:
可以在此处下载示例项目:TestKeyCommands.zip
ios - ctrl + enter 似乎不适用于 UIKeyCommand
我试图在 iOS 系统上干扰外部硬件键盘的输入。
一切正常,除了一个问题:尝试注册CTRL+ENTER代码后
按下组合不会触发动作,这意味着它似乎没有注册自己。但是,"\r" + [.command]
并且"\r" + [.alternate]
工作良好。
它出什么问题了?如何从外部键盘注册CTRL+ ?ENTER
ios - 使用 UIKeyCommand 时如何处理大小写字符
我们正在接收和处理键盘输入。
在我的源代码中,
有这部分。
但是,如果你这样处理它,它只会在它是大写的'M'时才反应,而当它是小写的'm'时它不会响应。
有没有办法处理所有大写和小写字符的 UIKeyCommand ?