ios - Programmatically press a keyboard button -


i wondering if there way open ios keyboard , programmatically press button without interacting keyboard itself.

yes, there way. there several ways of them undocumented , should not used them in production.

generating tap means generating uievent (several of them, actually) , passing uiapplication.sendevent(_:).

unfortunately, uievent inner structure undocumented people have inspected , can google tools synthesize events (e.g. https://github.com/n00neimp0rtant/controlfreak). note internal structure of uievent , uitouch can change between ios versions (see ios 9 uievent)

you can use internal uiautomation api (see example these generated headers) generate tap (that's ui tests using in previous releases) again, api not publicly documented , loaded app if app connected xcode. not sure how private framework looks on ios 9.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -