1

I want to show a pop up window in my iPhone app whenever I receive a push notification through didRecieveRemoteNotification. Something like the windows shown in the image attached. I tried doing addSubview with my view controller, but it occupies the entire screen. How do I create the pop-ups?Pop Window UI

2
  • there is no screen shot attached Commented Jun 11, 2012 at 21:35
  • I did attach the image I got from here: [link] (mobile-patterns.com/edu) Please check. Commented Jun 11, 2012 at 21:37

1 Answer 1

2

Instead of adding a subview with dimensions of the screen {320x460}, create a view with smaller dimensions such as {100,100} and add rounded corners to them via the UIView layer properties

#import <QuartzCore/QuartzCore.h> .... view.layer.cornerRadius = 5; view.layer.masksToBounds = YES; 

UPDATE: To achieve the background dim effect, contradicting to what I first suggested. Add your PopUp view to a view with a frame of the full screen dimensions {320,460}. You then apply a transparency color to it via the UIColor -colorWithWhite:alpha: method. Like below:

view.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5]; 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.