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 Still waiting on your CI build? Speed it up ~3x with Blaze - change one line, pay less, keep your existing GitHub workflows. First 25 HWS readers to use code HACKING at checkout get 50% off the first year. Try it now for free!
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.