I've been looking around on the internet and there doesn't seem to be much in the way of conversation (or I'm asking the wrong question - I'm new at Objective-C and iOS both) about creating a custom Assistive Touch-like button in iOS.
I would like to access my app from a launcher application and then float a button that would let me go back into said launcher from anywhere in my app. The floating Assistive Touch button scheme seems perfect - has anyone made something like that?
[EDIT]
In response to the meaningful questions - I wasn't clear enough (again, apologies - inexperienced here).
I have three apps: App Gatherer, App Target 01, App Target 02.
App Gatherer will be able to launch multiple apps via URL. Once it does that, and the new app opens, I'm wondering if I can have a floating button that can be moved around and clicked seperate from the UI of the Target App like the Assistive Touch button. The purpose of the floating button is to get me back out of any Target Apps - it's totally separate - to the Gatherer App.
I don't have any implementation - I'm just trying to map it out and see if it's even possible. Am I in the wrong place to ask that?
when u open a app using url from AppGatherer. Then in the Target app there is only 1 way of going back to appgatherer and that is using a url again but this time opening AppGatherer. So the custom floating button will have to be implemented inside the AppTarget and when the person clicks that button AppGatherer is opened via URL Scheme. There is no other way around. You cant have a floating universal button. You will have to implement the floating button inside every AppTarget application seperately. Plus it goes without saying that button will have to be implemented in every seperate view you have within the AppTargt application.
And in order to make a floating button you will need to keep above all other views plus handle its dragging within the onDrag methods and etc.
Related
I would like to click an element without user input. I see it's possible in XCUIElement which is a part of the XCTest framework to ensure things are working correctly, and I'm aware of various other testing frameworks that support E2E testing with simulated clicks. But is it possible to trigger this in production outside of testing? E.g. How app remotes work for a TV - pressing a button on the app will move right, left, or click an object on the TV (only remove the TV from this question and have it target the OS it's running on)
It seems accessing other apps might not be possible - https://developer.apple.com/forums/thread/698795?login=true
But they did recommend a way to programmatically click a button that was found in another stack overflow post here - how to programmatically fake a touch event to a UIButton?
Currently it is cumbersome for the user to repeatedly scroll and take a screenshot if they want to capture more than what can fit on the screen at a time.
I would like to implement functionality such that at the request of a user (e.g. via tapping a special button on a custom keyboard), screenshots of the entire scrollable area of the currently opened app are automatically taken and stitched together.
Is this possible? And if so, how?
To clarify, the application containing the scrollable area is a third party application over which I have no control, e.g. iMessage or Facebook.
Edit: I am aware of answers like this one and this one that are about taking screenshots within an app that I control. As far as I can tell, these are not applicable in my situation. Please correct me if I am wrong about this.
This is not possible. Each app is contained in a protected sandbox that no other apps have access to.
You could make a custom keyboard, but you still wouldn't have access to any of the views in the app that you don't control.
I am looking in the newly announced 3D Touch to be released in the next set of apple phones. I see a great use case for this in and app that I have in development however when looking up the feature (https://developer.apple.com/ios/3d-touch/) I still cannot get a good feel for what Human Interface Restrictions may be in place for this type of feature.
If there is someone out there who understands how this 3D Touch works. Will it be possible (and permitted) to develop a Modal pop-up UITableView that would appear when 3D Touch force press is made on an item within the app? I am thinking something similar to the "Quick Actions" they have for the home screen but within my app.
Currently in the app, the user clicks on the item, sees its details page, and then its a "set" button to set it to a certain position a daily slot. I was thinking it would be much easier if the user could skip the details screen all together and have a force touch bring up a modal popup with a list of days for them to choose allowing them to set the item faster.
I am wondering if this would be in violation of the Human Interface Guidelines or would cause any trouble when submitting the app?
There seems to be dozens of questions on how to deal with :hover event on the websites when viewed in iPad.
My question is different - I'm building a native iOS game and it would be really good if a user can compare two items side by side. On PC this can easily be done by displaying one item a mouse-over panel when mouse hovers over an inventory item. The main benefit of such panel is that it is easy to show and easy to close on PC.
What are my alternatives for displaying a transient, hover-like interaction panel in a native iOS app?
For iPad (not iPhone) a UIPopover is pretty close to what you want. If you want to support iPhone/iPod as well, there are third party popover libraries for those devices.
However, I'm not sure how this would do for comparing 2 items, since the system only displays 1 popover at a time.
This is really more like a map callout bubble. You could build your own callout bubble sort of interface yourself without a lot of work. When you tap on an item, it would display it's callout, and when you tap on it again, or tap outside all items/callouts, it would hide it. I've done something like that for a custom map system I built for a client and it wasn't that hard.
I have implemented an alternative keyboard on my first iPhone app. I would like to play a sound when a button is pressed. The default click sound when the standard keyboard is pressed would be fine, but I don't know how to get that sound.
In this answer I found how to play a 'tock' sound:
Playing system sound without importing your own
I got this to work easily enough but it is a very loud sound. I've searched Stack Overflow and the Xcode help for available iOS system sounds other than 'tock' and I can't find them.
Are there other built-in sounds, maybe even the default keyboard sound, that I can use?
Prior to, and since posting this question almost 2 weeks ago I have searched high and low for a method to make the keyboard click sound work in my app. I have attempted to implement and understand Apple's documentation on custom input views. I butchered my app in many ways attempting to make it work and created several test projects. I tried to interpret how to do this from various other sources on the web. All to no avail. I have finished my app all but for this last function.
I finally hit on a simple answer towards the end of this IPhone Dev SDK form question/post. The ultimate answer is easy and can be done in a few seconds with these easy steps.
Link the 'AudioToolbox.framework' to your project (Click on your project's Target, select 'Build Phases' and under the 'Link Binary with Libraries' item click the + button and add the framework.
Add the following to the header file of the class where you want to implement the click:
#import <AudioToolbox/AudioToolbox.h>
Add the following line of code in the implementation file of your class wherever you want the keyboard click sound to appear:
AudioServicesPlaySystemSound(0x450);
THAT'S IT! AND IT WORKED!!! HALLELUJAH!
According to Paul in the other forum this has the following downside:
"keyboard keys won't be affected by the iOS user preference for keyboard sound on/off."
But when I turn the volume up or down on my iPhone or if I mute the iPhone, the keyboard click sounds do go up and down or are muted as would be expected. Given that I found it impossible to implement keyboard clicks "UIInputViewAudioFeedback" as documented, I'm happy to have anything work.
P.S. If anyone has a link to an actual project that I can download, build and run on my iPhone to see EXACTLY how to properly implement: "UIInputViewAudioFeedback" I'd be happy to give it a look. But so far I've found none, nor any step-by-step newbie style instructions on how to make it work.
[Sept 30, 2012 UPDATE:] I'm happy to say that my app was accepted into the app store using this method. Here it is: https://itunes.apple.com/app/fine-tip-tip-calculator/id563429225
...Dale
Try UIDevice's playInputClick:
[[UIDevice currentDevice] playInputClick];
From the documentation:
Use this method to play the standard system keyboard click in response to a user tapping in a custom input or keyboard accessory view. A click plays only if the user has enabled keyboard clicks in Settings > Sounds, and only if the input view is itself enabled and visible.
Make sure you adopt the UIInputViewAudioFeedback protocol in your input view class, and implement the enableInputClicksWhenVisible delegate method to return YES, as per the documentation.
EDIT - For implementation of delegate methods, check out Apple's documentation on custom input views.