First, regarding the flag: custom flags can take a long time to be processed. Be patient.
I'm pretty sure the problem was the way you presented the link to your library on revision 13.
There is a huge animated banner that links to the library repo. You disclose you are the author by saying "I have implemented", but even then the link serves only to promote the library, there is no useful information in the post.
(There is no useful information in the post in regards to the linked library; there is useful information if one goes beyond that, and up to revision 12 the post seemed fine).

For those that can't see the post, all those red widgets are either spinning or pulsating, and the whole thing is a link to the mentioned library. I'm including only the problematic part of the answer, which is almost 2100 chars long. The rest of the post is detailed and looks fine to my non-expert eyes.
That there is a link without useful content, and the spammy tactic of inserting a big animated banner, are not good things to do.
If you want to link your library, that's fine. Just add the link (and as you did, disclose authorship) with a couple of examples of how to use it.. That way, the answer and the link remain useful for future visitors without having to go to an external site. And please, remove the animated banner. Add images only in ways that fit organically in the post to add information, not for promotion.
Responding to some comments:
[regarding the animated ad] I'm not a fan too, but I should make the answer stand out in other answers.
No, you should not. Just focus on the content, not on standing out from the other posts.
And the moderator was very expert in the JS field I think. Maybe he/she doesn't get the relation at the first sight.
One doesn't need to be an expert on Swift to see the problem here.
that's the reason I've deleted that section immediately. I didn't like that either.
You removed after the post had been deleted. In reaction to a mod deleting the post as spam. It's fine that you removed it, but the mod had no way to know that you were going to do that in the future.
But the point is that can be commented instead of getting aggressive deletion I think.
Deletion is not aggressive. Being spammy is a hard "no" on the site. Deletion for breaking the self-promotion rules is warranted.
Now that you removed that part, you just need to wait on a mod to see your custom flag, and hopefully they'll undelete the post.