How did Apple make its action plan like this?

I was researching the new Apple Music app the other day and found a rather peculiar action sheet ...

A peculiar action sheet

Until now I didn't know what UIAlertController

or UIActionSheet

could have such delimiters! Think about it, how did they get that top button to look like a table cell?

I put documents UIActionSheet

, UIAlertController

and UIAlertAction

without success. As far as I know, Apple doesn't seem kind enough to subclass them or mess up the view hierarchy.

Now my questions are:

  • How can I reproduce those thicker separator stuff on my own action sheets?
  • How do I reproduce that top button with an image and descriptive text below the main body of the action?
  • Is there currently an API that provides this functionality?

Any guidance would be much appreciated. Thank you in advance.

+3


source to share


1 answer


This is normal UIAlertController

or UIActionSheet

but the last sheet has a custom view which is an image and a label 2

you can see these questions if you want to know how to do it with a regular one UIActionSheet

, but it's a bit tricky

First question

Second question

Third question

Ch Tut

or if you don't want to use hacks on UIActionSheet

or UIAlertController

you can use this library as a replacement for JGActionSheet action sheets



other libraries

ahkactionsheet

rmactioncontroller

sgactionview

+6


source







All Articles