What is the name of this dismissable viewcontrollable in iOS? - ios

I just want to know is this a custom view controller or it is something provided by apple, if thats the case what is its name?

Its a custom modal view controller which you can animate in with UIViewControllerTransitionCoordinator. If you don't want to mess with the code then consider using the Hero pod which can acheive a similar effect.

Related

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

How to load another UIViewController to a UIView Example Like UITabbarController

I have a 2 UIViewController(s), I need to be able to change the views at the bottom of the Airtime and Data Plan Upon tap gesture on Airtime and Data Plan!
The yellow line will indicate the active view controller. some thing like tab bar.
Perhaps, the image attached is an android version
Could anyone provide a help on how to go about this.
Thanks
I personally use a library called ICVIewPager
https://github.com/iltercengiz/ICViewPager
This is pretty simple and easy to use with examples. It should put you in the right direction without writing a lot of code.

Component in iOS to make a selector option

I wonder which component is being used to create a selector option like the one used in iBooks where we can adjust the Font Size and also the Theme, but without moving to a new view controller.
In my application I would like to implement it giving 3 small options to the user to choose, but without moving the view controller being presented. Its a small square area with an arrow at the bottom or top side giving the impression where it's coming from. (Let me know if I am not clear with the explanation).
Does anybody know how to use it??
Thank you all in advance
ibooks is using UIView. In that UIView you can add any controls you like. You need to use delegate methods so that I can perform communication between two objects(send message to another object). You will be able to make you custom UIView as controls.

Replacing container view of UIActionSheet with my custom view

I am developing an iPhone application in which I want to customize the action sheet with my own background image for action sheet and buttons.
I can write my own view which behaves like UIActionSheet. But, UIActionSheet by itself has some standard behavior like blocking orientation events. We might not be aware of such things. So, for safety purpose, it is better to have UIActionSheet itself; by replacing all its views with my custom view.
For this I have done the following things:
1. Create UIActionSheet. Call showOnView: on that action sheet.
2. Set the delegate as myController
3. In the delegate method willPresentActionSheet: remove all the subviews and add my custom view as action-sheet's sub-view
The problem is that I cannot get the animation affect of Action Sheet with my custom view, Because,UIActionSheet is animated before calling willPresentActionSheet (in showInView). If I override showInView and add my own animation I might miss the behavior like:
1. Blocking orientation events
2. Some of the views (the argument of showInView:) might no support orientation. I should be able to apply same orientation to my action-sheet in showInView.
Could someone help me out in achieving customization?
Thanks and Regards, Deepa

Resources