Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
What I would like to do is for the modal view to have a semi-transparent background image so that the views underneath can still be seen. I have used a semi transparent image as a background but it doesn't work. Has any one experienced this? Or is there some standard code/way to do this.
Why can't you simply set the alpha value of the background of the modal view to something less than 1?
I think another way is to use an opaque image and set the transparency of the whole view to something less than 1. The downside (and partial upside) to this is that any subviews on the modal view will take the same alpha value.
Maybe you could set the alpha of the modal view's background to zero, making the background completely transparent, then overlay a partially transparent image, then whatever UI elements you want? I think that might work.
I have this same problem. Not sure how to get around the fact that the background just isn't transparent. I got an off-the-cuff answer from someone at Apple that maybe they're throwing up an opaque window, but my experiments with that theory went nowhere....
So we're stuck with solid backgrounds on view controllers that are presented modally? Setting the background of the View to alpha=0 has no effect ,nor does this, in the view controllers viewDidLoad:
I'm having the same problem. Can't find a solution.
I wanted to push a modal view onto the stack with semi-transparency and a clear background so that the text in my UIWeb view look like a heads up display. But no luck so far.
It is possible but I don't know how. I'm trying to figure out how to do this. The USAToday app does this with their survey. The modalview comes up, covers the tabbar and everything. The top bar is still visible through the modalview.
I haven't seen the App you are referencing, but is it possible that it's just a regular view that they're popping up and not necessarily invoking a modal view controller?
My Apps: iTouchdown, <a href="http://click.linksynergy.com/fs-bin/click?id=JCBJ49fJNJI&subid=&offerid=146261.1&type=10&tmpid
Apparently the reason is that the modal view removes (replaces) the previous view from the window. So, even if the modal view itself is semi-transparent, there is nothing to show underneath. That is the problem. Apparently this was proven.
So people are suggesting to make a "modal" view to be inserted as the top view, or draw the "modal" view on top of the current contents of the window.
Either way, you don't use the presentModalViewController, but you do the view hierarchy management yourself. If you used a delegate protocol, you have to dispose of the delegate and the view controller instance yourself appropriately.
I have done similar things before and pondering which way is the best for me...
Apparently the reason is that the model view removes (replaces) the previous view from the window. So, even if the model view itself is semi-transparent, there is nothing to show underneath. That is the problem. Apparently this was proven.
So people are suggesting to make a "modal" view to be inserted as the top view, or draw the "modal" view on top of the current contents of the window.
Either way, you don't use the presentModalViewController, but you do the view hierarchy management yourself. If you still used a delegate protocol, you have to dispose of the delegate and the view controller instance yourself appropriately.
I have done similar things before and pondering which way is the best for me...
7 months later, is there still no way to get transparency when presenting modal views? I mean, no easy built-in ways in the SDK?
I know this is an old thread but I've come across some sample code that implements showing a semi-transparent view by using UIActionSheet with no buttons.
What I would like to do is for the modal view to have a semi-transparent background image so that the views underneath can still be seen. I have used a semi transparent image as a background but it doesn't work. Has any one experienced this? Or is there some standard code/way to do this.
Cheers, Tom
Hi, You can check this link reednj - iOS: Semi-modal date picker for iPhone There is a beautiful example given about modalviewcontrollers with semi transparent background. Hope this serves your purpose.:D:D:D
Replies
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI think another way is to use an opaque image and set the transparency of the whole view to something less than 1. The downside (and partial upside) to this is that any subviews on the modal view will take the same alpha value.
Maybe you could set the alpha of the modal view's background to zero, making the background completely transparent, then overlay a partially transparent image, then whatever UI elements you want? I think that might work.
-MrB
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI wanted to push a modal view onto the stack with semi-transparency and a clear background so that the text in my UIWeb view look like a heads up display. But no luck so far.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeSo people are suggesting to make a "modal" view to be inserted as the top view, or draw the "modal" view on top of the current contents of the window.
Transparent Modal View on Navigation Controller - Stack Overflow
Talk Funnel Blog Archive Semi-Modal (Transparent) Dialogs on the iPhone
Either way, you don't use the presentModalViewController, but you do the view hierarchy management yourself. If you used a delegate protocol, you have to dispose of the delegate and the view controller instance yourself appropriately.
I have done similar things before and pondering which way is the best for me...
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomeyou must have a handle (currentView) of the view you and to add the semi-transparent view to.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomereednj - iOS: Semi-modal date picker for iPhone
There is a beautiful example given about modalviewcontrollers with semi transparent background. Hope this serves your purpose.:D:D:D
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome