UIAlertController custom font, size, color

后端 未结 25 2001
遥遥无期
遥遥无期 2020-11-22 09:06

I am using new UIAlertController for showing alerts. I have this code:

// nil titles break alert interface on iOS 8.0, so we\'ll be using empty strings
UIAle         


        
25条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 09:54

    You can use an external library like PMAlertController without using workaround, where you can substitute Apple's uncustomizable UIAlertController with a super customizable alert.

    Compatible with Xcode 8, Swift 3 and Objective-C


    Features:

    • [x] Header View
    • [x] Header Image (Optional)
    • [x] Title
    • [x] Description message
    • [x] Customizations: fonts, colors, dimensions & more
    • [x] 1, 2 buttons (horizontally) or 3+ buttons (vertically)
    • [x] Closure when a button is pressed
    • [x] Text Fields support
    • [x] Similar implementation to UIAlertController
    • [x] Cocoapods
    • [x] Carthage
    • [x] Animation with UIKit Dynamics
    • [x] Objective-C compatibility
    • [x] Swift 2.3 & Swift 3 support

提交回复
热议问题