Accessing the UIView of tabBarButtonItem

I need to animate the UIView of a tabBarButton with some fade in. - fade out effect.


I use UIView animation ; to do so, I need to access the UIView of the barButton.


I do it as follows, which works perfectly:


if let buttonView = self.navigationItem.leftBarButtonItem!.value(forKey: "view") as? UIView {



Question: would this be considered as using a private API ?


what I read from h ttps://gist.github.com/ArtSabintsev/8825288) says no problem.


I would appreciate a confirmation.

Accepted Reply

Closing the thread.

Replies

Closing the thread.