Make my look as beautiful as NSAlertView

I have a modal view in an application for iPhone (Xcode, Objective C ++). How to make it as beautiful as the UIAlertView system? In particular, I want:

  • Rounded rectangular window with a frame around it.
  • translucent background
  • subtle backlight

Clearly, transparency can be achieved by using less than one alpha channel per background color. What about the framework and the rest?

+3
source share
1 answer

On iPhone OS 3.0 and later, you can easily get rounded corners by setting the borderRadius property of the view layer.

view.layer.cornerRadius = 5;

#import <QuartzCore/QuartzCore.h>, CALayer.

, - , .

, .

, Core Graphics CGGradient.

, UIImage stretchableImageWithTopCapHeight:leftCapWidth:; , .

+5

Source: https://habr.com/ru/post/1728005/


All Articles