怎么设置苹果手机图标文字阴影呢?

怎么设置苹果手机图标文字阴影呢?,第1张

如下:

iOS16的图标文字阴芦历影,应该是苹果开发为了在浅色背景下凸出APP名称而设计的。但部分iPhone用运圆户纷纷表示,这样的UI设计确实无法接受。

工具/材料:iphone14、ios16、设置1.0。

1、打开iPhone【设置】页面。

2、在打开的“设置”页面中选择“墙纸”选项。

3、在打开页面点开主屏幕预览下方的【自定】,选择“颜色”旁哗塌或“渐变”选项,再点击“完成”即可。

4、下面分别是设置前和设置后的桌面显示。

这碧拍是从xcode里面摘取的内容,苹果的官方文档

/** Shadow properties. **/

/* The color of the shadow. Defaults to opaque black. Colors created

* from patterns are currently NOT supported. Animatable. */

@property(nullable) CGColorRef shadowColor

/* The opacity of the shadow. Defaults to 0. Specifying a value outside the

* [0,1] range will give undefined results. Animatable. */

@property float shadowOpacity

/* The shadow offset. Defaults to (0, -3). Animatable. */

@property CGSize shadowOffset

/* The blur radius used to create the shadow. Defaults to 3. Animatable. */

@property CGFloat shadowRadius

/* When non-null this path defines the outline used to construct the

其实就是做祥三个属性

后面这个是做悔胡羡的效果图

form http://blog.csdn.net/rhljiayou/article/details/10178723

- (void)addShadowColor {

    //添加显示

    UIImage *image = [UIImage imageNamed:@"小可爱"]//IMG_2683.jpg

    UIImageView *imageView = [[UIImageView alloc] initWithImage:image]

    imageView.contentMode = UIViewContentModeScaleAspectFill

    imageView.frame = CGRectMake(50, 100, 200, 300)

    //添加边框

//    CALayer *layer = [imageView layer]

//

//    layer.borderColor = [[UIColor redColor] CGColor]

//

//    layer.borderWidth = 0.5f

    //添加四个边阴影

//    imageView.layer.shadowColor = [UIColor redColor].CGColor//阴影颜色

//    imageView.layer.shadowOffset = CGSizeMake(0, 0)//偏移距离

//    imageView.layer.shadowOpacity = 0.5//不透明度拍灶

//    imageView.layer.shadowRadius = 10.0//半径

    //添加两个边阴影

    imageView.layer.shadowColor = [UIColor blueColor].CGColor//阴影颜色

    imageView.layer.shadowOffset 野贺森= CGSizeMake(4, 4)//偏移距离

    imageView.layer.shadowOpacity 颂亩= 0.5//不透明度

    imageView.layer.shadowRadius = 2.0//半径

    [self.view addSubview:imageView] 

}


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11990025.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-20
下一篇 2023-05-20

发表评论

登录后才能评论

评论列表(0条)

保存