dimming a UIView
Can someone tell me how do I achieve the UIActionSheet like behavior? I have a view that slides from bottom on button click. Now when this happens, I want my parent view to dim out and this "scrolled-up" view to remain sharp.
What's happening because of
[parentView addsubview: scrolledupView]
[parentView setBackgroundColor=[UIColor blackColor]];
[parentView setAlpha:0.5f];
is that both the views dim out.
开发者_如何转开发How could I dim out only the parent view with dimming out my "scrolled-up" view.
In essence, I am trying to replicate the UIActionSheet behavior.
Also tell me if this could result in a rejection on app store?
You can create empty view:
- Put it above your parent view or place it over the space not covered by scrollview.
- Change it's background to black.
- Set required opacity.
Edit: To add the view that scrolls up on top of this empty view, try:
[parentView insertSubview:slidingView aboveSubview:dimmingView];
or
[parentView insertSubview:slidingView atIndex:0];
精彩评论