Sunday, July 21, 2024
HomeiOS Developmentuse of customized UIAlertMenu

use of customized UIAlertMenu


I am curious if I’ll run into bother of getting my app accredited by App Retailer if I am utilizing custom-made UIAlterMenu.
I wished to make the UIAlterMenu to look the best way I would like, so I make some adjustments to it. Code as follows:

        let imageAttachment = NSTextAttachment()
        imageAttachment.picture =  itemDisposalAlterIcon
        let fullString = NSMutableAttributedString(string: "n")
        fullString.append(NSAttributedString(attachment: imageAttachment))
        fullString.append(NSAttributedString("nItem Disposal"))
        
        let UIAlterMenu = UIAlertController(title: "", message:  "", preferredStyle: UIAlertController.Fashion.alert)
        UIAlterMenu.setValue(fullString, forKey: "attributedTitle")
        UIAlterMenu.view.subviews.first?.subviews.first?.subviews.first?.backgroundColor = .systemYellow
        UIAlterMenu.view.tintColor = .white 

        let trashAction = UIAlertAction(title: "Destroy", model: UIAlertAction.Fashion.damaging, handler: trashHandler)
        let trashImage = SKTexture(imageNamed: "trash")
        let trashUIImage =  UIImage(cgImage: trashImage.cgImage())
        trashAction.setValue(trashUIImage.withRenderingMode(.alwaysOriginal), forKey: "picture")
        UIAlterMenu.addAction(trashAction)

Can somebody please let me know if the above is suitable? I am tapping into non-public APIs?

Thanks upfront.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments