views:

53

answers:

1

Hey everyone,

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?

A: 

You can create empty view:

  1. Put it above your parent view or place it over the space not covered by scrollview.
  2. Change it's background to black.
  3. 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];
how can I put it over parent view?
Bogus Boy
there is no scroll view. It's another view that slides up.
Bogus Boy
See I have tried doing what you said. Putting an empty view and setting it's alpha value but how can add my view that scrolls up on top of this empty view other than doing this [emptyview addSubview:slideupView];
Bogus Boy
@kgut works fine man. Thanks a million. You guys keep me going else I would have quit long ago.
Bogus Boy