Your challenge for this milestone is to create a meme generation app using UIImagePickerController
, 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:
UIImage
using Core Graphics.UIActivityViewController
.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.
UIAlertController
with a text field inside.UIImage
first, then add the text on top.NSAttributedString
has 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!
SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.