I was wondering how to make a popup window similar to this example:
The origin window is full of buttons that when is selected will then pull up the image I desire to use.
I would simply create a reusable UIView
component and everything you need as a subview, such as a UIImageView
for your image, a UILabel
or a UIButton
in the top right. Here is the process to show it:
UIView
that takes up the full screen, make it black, and maybe 0.5 alpha.UIView
which is your primary pop-up view, make it slightly smaller than the previous view, but make sure both of these views are subviews of the parent subview.UIView
subclass if you plan to use this a lot.hidden = true
when created and so that when a button is selected, you can set them to hidden = false
alpha = 0.0
and use something like UIView's animateWithDuration
and set the pop-up view to alpha = 1.0
There is a lot of little details you can change to cater to your needs, but this is the basic structure on how to accomplish your goal.
Check out UIView animation methods here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With