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

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

Related

How to create a group in the UIAlertController

I have implemented an UIAlertController (currently using the XLActionController) with the look and feel as the builtin menu from the iOS Contacts app (see pictures below).
I want to add a submenu which "folds out" just like in the Contacts app (see picture 2)
The builtin Contacts app (see pictures) has a menu which contains a "group" which opens (animates) when clicked - revealing the siblings as showin in the second picture. When the header is clicked it closes (animates) and returns like shows in the first picture. (The below can be achieved installing a supported app like Skype for Business)
Is this possible to build using either the default UIAlertController or eg XLActionController
This answer does not solve your problem but it may help you find a solution.
You need to build a custom view controller transitions and presentations. Your viewController must be a subclass of UIPresentationController. Have a look at this tutorial.
UIPresentationController Tutorial
You can use also a simple UIView which contains a UITableView that you animate upwards/downwards. Have a look at this tutorial
How to Create a Slide-In Menu

Why can't I attach an action to the new Sign In With Apple ASAuthorizationAppleIDButton in a Storyboard?

I'm working on a new codebase that has everything laid out in storyboards and I'm trying to implement the new ASAuthorizationAppleIDButton button as part of the new Sign In With Apple feature.
Reading online it looks like I can add a UIButton to the view and then override the class to be ASAuthorizationAppleIDButton. Easy enough. The weird parts comes when I try and wire that button up to an action in the VC. I can't do it. Even if I go the other way and drag from the button to the VC, the action item is missing from the connection menu.
Has anyone had success adding and interacting with this button from a storyboard? I'd prefer not to redo the entire view just because of this one issue.
ASAuthorizationAppleIDButton is not a button but its a control. And this is stated in that way to avoid misuse of this as a button. And only one action is associated with it which cannot be override. The only control you get is to use the delegate method of
didCompleteWithAuthorization & didCompleteWithError.
So if you want to use/include some extra selector or methods. you can add those in these delegate- methods.

Which control should I use to display an ActionSheet-like view at the top of the screen?

I was asked to display a list of three options for the user in a View sliding from the top to bottom. They say it should slide from the top because the action is initiated from a dropdown-like button on the navigation bar.
Most of what I found on that subject mentions the deprecated UIActionSheet class.
The "new" way using UIAlertController doesn't seem to allow us to change position of the view. At the least from what I've found.
The end result I'm trying to get can be seen on the image below,
From what I've learned about iOS programming, one method I could think to achieve that would be to create a new UIViewController and to use a custom class to control the transition. But it just seems so much. And I think it wouldn't not look like a dropdown afterall.
The other option would be to create the TableView with options and leave it on the Controller where it should be displayed, configuring its height to zero. And then Animating when necessary. I also have such a bad feeling doing it this way.
Is there a right way to do this on iOS? Does one of the options I've found seems acceptable?
Thanks.
Following the suggestion given by #Losiowaty on the comments, I started looking for a custom View/Control on cocoapods and ended up finding quite a few that did what I was looking.
The one I decided to use is this:
https://github.com/lminhtm/LMDropdownView

Change size of alertViewController

I want to add switches and labels to my alertViewController, so i need to change the size of the alertViewController.
How can I do this (Objective C).
Thanks
Somebody posted an answer and then deleted it. As rmaddy says in his comments, you can't customize UIAlertController like that. You'll have to create your own custom alert controller class, or find a third party framework that offers the features that you want.
(When I've needed to customize an alert beyond what Apple's UIAlertController allows, I had good luck finding a 3rd party library that let me do what I needed to do.)
You can not change the size of the alert view controller. Make a custom view and add on it.
You will need to create a subclass of UIAlertController thats the only way you can modify something.
I recommend that you use a third party library SCLAlertView

How to add UIAccessibility feature to a UIButton Action?

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

Resources