How to add UIAccessibility feature to a UIButton Action? - ios

I am new to Accessibility and i got a requirement to implement this feature on click of a UIButton. Can someone please help me out in providing any sample code on how to implement this?

most of the ui elements have a .accessibilityHint and .accessibilityLabel properties.
just name them appropriately and you are good to go.
if you want more detail, check this SO post: iOS accessibility: label vs hint

Related

Sign in with apple using story board [SWIFT - Xcode11]

I want to integrate the Sign in with apple button using storyboard because its hard to programmatically do it because I have an existing User Interface for login form. with facebook google etc buttons, as I searched, i stumbled with this:
https://medium.com/takeaway-tech/sign-in-with-apple-storyboard-version-698c650956e7, it tells in the step
that "In your storyboard, add a view object, and set the control’s class value to ASAuthorizationAppleIDButton in Xcode’s Identity Inspector" can someone show a step in image on how to implement this? sorry i'm fairly new in coding swift iOS. much appreciated if someone can demonstrate how this control class value works, thank you.
Below are the steps to define a custom class for a generic view in Storyboard

How to draw inside a view in a UIScrollView or UIViewVontroller?

I want to implement a signature feature in my tabbar application. I want to add a subView to a UIScrollView or UIViewController (which ever is the more appropriate and easier). Which control should I use for it?
I want to pick the touch events on the signature view and draw on those points to get the signature. Any help would be highly appreciated.
You can use just a UIView for drawing points get touched. I needed to implement something like that and the following page was really helpful. It explains all with code. You may want to check it out.
http://www.effectiveui.com/blog/2011/12/02/how-to-build-a-simple-painting-app-for-ios/
First thing you need to read is this - http://developer.apple.com
and check this apple demo - GLPaint
after that you may check this - tutorial

Create custom UIButton with multiple images and shift Label and maybe add properties

for an iPad application in ios5.0 and arc, I need to create a button that has an image covering the entire button, and needs to have another transparent image at the bottom half of this button image OR have the button text label covering the bottom half of this button image.
In posts on this site I've read that using button subclass to just change the appearance of the UiButton should not be done. However, if I don't subclass, can I add these transparent image/and shift the button label? if so, how?
In case I need to add properties to the button, what is the best way to go about it.
If subclassing is the only option, can you also pls give pointers on what are the methods that i must absolutely override and any other such memory/performance considerations that I must keep in mind
Pointers to Any tutorials or third party libraries would be most appreciated.. Thanks in advance for all your help
I don't agree on "subclassing UIButton is not good". That's exactly why inheritance and subclassing mechanisms exist. In all platforms, the framework provides a base foundation for general needs, and you do extend them in the case standard stuff does not satisfy your needs. And you do it by subclassing.
As long as you know what you do, and what you do works for you and solves your problem, you're fine.
When you subclass UIButton, depending on what you actually want to achieve, you may want to override init:, initWithRect:, layoutSubviews:, awakeFromNib: methods.
Inspecting some subclasses would also help:
https://github.com/ardalahmet/SSCheckBoxView
https://github.com/ardalahmet/CopyableCell
For UIButton, you can inspect this component. Source code may help a lot.

Open Flow Alex Fajkowski

I am using Open Flow(Cover Flow) implementation of Alex Fajkowski https://github.com/thefaj/OpenFlow. I would like to a text lable under the images, which should update for each view. I still cant make it work. Would anyone be so kind and give me some further hints where exactly and how to implement this?
Best Regards Regen
Well theres a delegate method (selectionDidChange) that gives you the currently selected index. Hook up a textView to your view controller. Then update the textview in the delegate method "selectionDidChange"

how to make custom gestures in ios

is it possible to make custom gestures in iOS such as a zigzag, or a other lines types?
and can one link any action to a gesture. if you know an answer, or a link to an answer or exlanation, please share ... thanks
It is possible to create your own gesture recognizers. You can look at this section of the Event Handling Guide for iOS which gives information as to how you can build your own custom subclass.

Resources