How to replicate home button double tap effect on click of a button? - ios

In IOS, when we double tap the home button, it lift's the current app and shows all the app that are running on the bottom. I can scroll the bottom and select the music player option from there. I want to achieve the same screen lift effect, when user taps a button from withing the app instead of double tapping the home button. Is it possible to that? If yes, how can we do it?

No the home button function (unless jailbroken) cannot be re-created inside your UI.
Also since iOS6 users can opt to have Guided Access enabled, if that button where to be created would be considered useless. Now that would be a pain to do in a de-bugging process.
You would have to access the Home Button API (if there was one) as well as the guided access API.

Related

How do I detect a long press on the app icon?

Is there a way to detect if the user has long-pressed the app icon on the home screen?
I can detect if a quick action is selected, but I'd also like to detect if the Home Screen Quick Action menu is displayed.
Is there a way to detect if the user has long-pressed the app icon on the home screen?
No. Cocoa is event driven. Without an event, your code doesn't run. You don’t get any event unless the user taps one your quick actions or Today extension.

Is it possible to control the "back to" button?

Is it possible for my app to hide the "back to" button that iOS inserts in the top of the screen?
Other than grabbing the name of your app, no there isn't a way to take over that button.
Its created by the system anytime one app opens another. It grabs just the bundle display name from the sending app. Tapping on it is outside of your application.
You can listen for didResignActive and other AppDelegate callbacks to adjust your app probably. But changing its behavior or keying on it specifically isn't possible.

Can I make my iphone app use only a portion of the screen

I was hoping to create a small windowed screen when the home button is pressed. It would keep a portion of the app process open while another app isn't open.
So say I had music playing on the app and when the home button gets pressed the screen would be windowed or shrunk and just displayed over the main screen (kind of like the little help button that can be moved around). Would using widgets in IOS 8 work?
When the user presses the Home button, the app goes to background, and that's it. You can't customize that action.
You only get a notification that the user closed the app so that you can save your app state or data for the next launch.

How to add a view/gesture recognisers to iPhone/iPad home Screen

Until today I believed that it's impossible but there is an app is called Shou from the Emu4iOS Store that record your screen and even if the app is in background there is a view on home screen that on touch redirect you to the app. (please see attached image)
My Question is how can I achieve the same ? How can I add a view to Home screen ?
That's a status bar in a recording state. These are system defined states, such as the green bar you get while taking a call. These appear when an app is recording audio automatically, and there is no way to trigger it manually.
There is no way to add views and gesture recognizers on to the springboard.

Bring previous app back to the front when user is done with my iOS app

My iOS 4/5/6 app is meant to be used briefly. I want the user to click a "Done, now go away" button which takes them back to the app they were using before mine came to the front.
Is there a way for my iOS to put itself in the background while returning the previous app to the front?
On an iPad, the user can get that effect by doing a four-finger swipe horizontally across the screen. But that gesture is not a complete solution because (a) that gesture does not work on a handheld device, and (2) not many users know of that gesture. I want to programmatically return the previous app to the front.
I want the user to click a "Done, now go away" button
That button is the Home button.
I want to programmatically return the previous app to the front.
There's no public API for switching to another app. Users have a number of options for switching between apps, though. In addition to the swipe gesture you mentioned, they can do a four-finger upward swipe to get to the list of recent apps, or double-tap the home button for the same effect, or hit the home button once to go back to Springboard. Users, not apps, are supposed to be in control of which app is in the foreground. And the way they do that should be standard from one app to another. I can understand wanting to make life easier for the user, but what you're trying to do just isn't possible with the available API.
I Don't think you can do that if the previous application is not your property or if you are not aware if a URL Scheme has been incorporated in the previous application that you know of.
Launch App Via URL Scheme!

Resources