tvOS - Replacing UISlider - uislider

I am extending an iOS app for tvOS.
On iOS app I have a lot of sliders (two-sided slider to choose a range for years eg. 1950-2010. or values from 0.1 to 10.0).
I was wondering how I am supposed to replace this functionality on tvOS.
My initial thought was to override the volume buttons of Siri remote and change the values but I don't believe that Apple would allow that.
Any recommendations?

My solution to this problem was to implement 2 buttons (arrow icons). One for increasing and one for decreasing the year value.

You could also use a UIProgressView and a UIPanGestureRecognizer. When the user swipes left or right, you can change the progress of the UIProgressView accordingly.

Related

iOS Swift - How many UILongPressGestureRecognizers can be enabled at one time?

I have a simple synthesizer application that has 28 buttons (UIView's), and each one has a UILongPressGestureRecognizer attached to it. The .minimumPressDuration for each recognizer is set to 0, so that simply touching a button will begin it's UILongPressGestureRecognizer and start an AudioKit Oscillator.
All works fine until more than five buttons (recognizers) are touched (enabled) at one time. The sixth recognizer is never enabled, and the first five recognizers stay enabled, even when the user's finger lifts from any or all of the buttons.
It's an unfortunate problem, given that I would like the user to be able to play more than five notes at a time.
Any ideas?
I have attached UILongPressRecognizers to buttons that do not start an AudioKit Oscillator, but instead temporarily change the color of another view, but the problem persists.
I have also tried touching other areas of the screen that do not have UIGestureRecognizers attached to them, and even those touches seem to cause the problem.
There is an undocumented 5 touch limit on iPhone. The number is higher for iPad but I'm not sure what that limit is (greater than 10).

How do I change the tint color (background) of a UIActionSheet in iOS5?

I would like to change the tint color of my UIActionSheet for my iOS apps. Is there an easy answer or custom class which I can use to achieve this?
I have found help on changing the colors of the Action Sheet buttons which is helpful, but I haven't found anything about changing the background color.
There is no API, but you could subclass UIActionSheet and play around with its subviews array till you find the one that draws the background and either edit it directly, or add a subview to cover it up.
While this isn't the greatest approach, it isn't using any hidden APIs to it won't get rejected from the iTunes store. Before iOS 5, this is how most customization was done.
Here is a great example of doing it with Navbars.
I am not able to respond to the above comments. However the link provided by #Luke is broken, but I have found it to be active here: https://github.com/gpambrozio/BlockAlertsAnd-ActionSheets
There is no legal API for this, and if you use illegal API your app will be rejected from the app store. The simplest solution is to roll your own interface and not use UIActionSheet.

wanted to implement brightness bar in ipad app

hey guys,
i am working on a ebook reader and in its course i wanted to allow the reader to reduce/increase the brightness accordingly. what i tried is ,placed a UISlider and gave the values as 0 and 1 for min and max respectively. I placed a imageView on the main view and aplied alpha component to the uiview which responds to the slider accordingly.
i succeeded but i know that it doesn't save the battery life of the ipad.
are there any predefined methods or framework which enables us to alter the brightness of the device.
thank you in advance
There is a private api call GSEventSetBacklightLevel(float). But if you are planning to submit this to the app store it will get rejected.
There is now of doing this via the public API, you could use, like you stated, a semi tranparent view with a black background over the window to make it look like you can control the brightness.,

How to create a custom UIView that shows 5 stars

I have a requirement for a UIView that displays stars similar to the way one can rate albums in iTunes on the Mac and iPhone.
Does anyone know what it would involve to create this or whether one is available online?
Have a look at the TouchCustoms library. I'm pretty sure there's a star rating component for iOS in there.
I had it done it a couple of months back. It is very simple.
Subclass a UIView.
Add the 5 stars(UIImageviews)
Write a function to toggle the image of the stars
In the touches Began and touches moved method Check for the touch and accordingly change the images of the imageviews.
Also add a int variable that will have the current rating.(you can set the value whenever the toggle changes the images of the stars)

UISlider with sound effect and vibration

I need to do a lot of things with UISlider. First of all I want to know what are all the things are possible and what are not. Please give me ideas for the doable ones.
I need to add a slider control in my iPhone application (that should resemble the one which is displayed in the iphone when the phone is getting charged).
Can the round button of the UISlider be changed to any other shape. Can any image be added on top of that round button?
When the UISlider is being moved, we need ad a sound effect(for example car stating sound) and when the sliding ends the sound should be stopped. is this possible? if yes, please gimme ideas to do this. 3. vibration should also happen while sliding (possible?)
Thanks in advance!!!
All of these can be done via the public API. Read the docs :-)
The button is called the "thumb image"; there's a property to replace the image.
Assign a delegate and set the 'continuous' property on the slider.
See the Application Programming Guide for more on delegates.
As far as question number 2, just write up the methods to accomplish playing a sound and vibrating and then have them fire when the value changes on the slider.