Creating a "Slide to power off" like slider on iOS - ios

I'm trying to create a slider like this:
Is there a UI Element I can use in order to achieve this? Or another way?

No, there is no direct UIElement available which will give the desired effect.
If you plan to release the app on AppStore I would suggest do not try to replicate slide to unlock / power off.
I had a app rejected exactly for this reason. Following is the rejection reason as given by Apple.
Specifically, the Slide to Start element is not appropriate
and not in compliance with the App Store Review Guidelines as it is
too similar to the iOS Slide to Unlock UI. While we understand this
specific UI element is not present in the current version of iOS, it
is still not appropriate to include it in your app.
I had this same UIElement approved in an earlier version but got rejected during an update. So there is a small chance it gets over looked.

Related

How can you prevent users from taking screenshots in a React Native IOS app?

I am currently building an IOS app with React Native, and I am looking into how to prevent users from taking screenshots on certain parts of the app.
I read this article on this issue: https://www.netguru.com/blog/prevent-screenshots-react-native, and I learned that there are basically two options. I can either use the paid ScreenShieldKit SDK or I can create an invisible screen animation that somehow covers the content of the app in a screenshot.
I am not looking to pay for ScreenShieldKit, so how can I go about making this animation to cover screenshots on my app, and will it even work?
Any help is appreciated. Thanks!
The two options for preventing screenshots on a React Native IOS App
ScreenShieldKit's technology is patented. And more likely than not, it is based on the other solution which you yourself know of (invisible screen animation). So it may not be wise to post the exact code here, as it could very well infringe upon their patent.

With iPhone 7 and UIFeedbackGenerator, which system actions perform which kinds of taptic feedback?

(This question is mostly applicable to those of us developing iPhone apps without access to an iPhone 7.)
I want to incorporate the new taptic feedback available with the iPhone 7 into my apps, and I want to make sure my uses of it align properly with how iOS uses them at a system level. Without a device I can't test this.
Apple provides a document describing the different kinds of feedback: https://developer.apple.com/ios/human-interface-guidelines/interaction/feedback/ Namely "Notification", "Impact", or "Selection".
For instance, in Mail.app, when you slide a cell to archive it, it gives taptic feedback. Which of those three above (and their corresponding "variation") does Mail.app use? I'm guessing "Selection" but may be wrong.
Bonus points for pulling down Notification Center or Control Center, as well as any others you can provide for reference, but the gestures in Mail.app would be an awesome start.
You should check out this article, it gives you an overview how UIFeedbackGenerator works. https://www.hackingwithswift.com/example-code/uikit/how-to-generate-haptic-feedback-with-uifeedbackgenerator
Alternatively, you can create a demo project and check out which feedback is best suited for your needs.
Edit:
It's the selection feedback for Mail app. The notification center uses multiple feedbacks depending upon the sliding. If you do it slowly, it's impact heavy and how if you do it a bit slowly, it's impact light and if you just slide it down immediately, it produces no feedback.

iPhone's Tone Color Change from an App

Recently, I have installed Twilight on my Android phone. Apparently is adds a color tone effect on the screen. Here are two screen shots taken from PlayStore.
Now my question is that is there a way to develop similar system display tone color set up application in iOS?
It is not possible as Apple restrict the developers to edit home screen. There are very limited features that we can access like Calendar, Gallery, etc. The above screenshot your are showing is related to Widget but there are no Widget concept in iOS.
Yes, it is certainly possible and I use an app that does this.
Have a look at https://github.com/anthonya1999/GoodNight, It's even open sourced.
However an app like this will most likely be denied from the App Store, but never the less it is possible.
Night Shift is supposed to bring something like this in iOS 9.3, though not to that extent.
I don't know of any public API that would allow an application to change that kind of parameter system-wise, though. Maybe in the Accessibility framework, but that would restrict it to app-wise, not system-wise.

Swift adding custom keyboard or numpad in app

What types of restrictions is there when adding a custom keyboard or numpad in an app?
I know that some apps requires you to enable keyboards in your system settings.
I recently saw an app using this keyboard:
The app does not require you to activate the keyboard. So how can I make my own custom numpad like this one?
Feel free to share any tutorials/libraries
thanks,
There's a great swift keyboard/calculator tutorial out there that will serve as a starting point for what you're doing:
http://code.tutsplus.com/tutorials/ios-8-creating-a-custom-keyboard-in-swift--cms-22344
In terms of "restrictions", you can add the keyboard to the parent app without any problems. If you want to make your keyboard available in OTHER apps, then you will need to adhere to the restrictions that Apple lays out on this page: https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Keyboard.html - search for "trust"
Swift and Xcode are both moving targets that are updated more often than a project can be completed! So be ready to deal with constant updates as you go through the learning curve. Sometimes the time it takes for a client to approve something is enough time for the Swift/xCode/iOS paradigm to change enough to require you to "fix" things that already worked before submitting for approval. Just row row gently down the stream.

how to distinguish on iOS volume button clicked from setting it by a software

Is there any way to distinguish in the iOS app a situation that someone have changed volume by hardware buttons on iPhone/iPad from the situation that it has been done by some UI control in the app?
I have searched for that and so far I came up with many ways to be notified that the volume has been changed but there is no way to find out whether it was done by the UI control or hardware buttons. Notifications include info abut a reason of change but it is the same for both situations.
After a long search I came up with this:
There is no way to detect hardware button been pressed (so far iOS 7). You can only be informed with the result - volume changed. It means that the only solution will be to properly handle situation when the volume change is triggered by some UI component.
You might want to have a look at the private API. rpetrich did some research again.. :) click here
But you need to know that this is not really a good idea because apple probably will reject your app when accessing private apis.

Resources