Your challenge for this milestone is to create a meme generation app using
UIAlertController, and Core Graphics. If you aren’t familiar with them, memes are a simple format that shows a picture with one line of text overlaid at the top and another overlaid at the bottom.
Your app should:
UIImageusing Core Graphics.
Both the top and bottom pieces of text should be optional; the user doesn’t need to provide them if they don’t want to.
Try to solve the challenge now. As per usual, there are some hints below in case you hit problems.
UIAlertControllerwith a text field inside.
UIImagefirst, then add the text on top.
NSAttributedStringhas keys to specify the stroke width and color of text, which would make it more readable – can you experiment to figure it out?
OK, that’s enough hints – get coding!
SAVE 50% To celebrate WWDC22, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
Link copied to your pasteboard.