gpt4 book ai didi

cocoa-touch - 如何在 iOS7 中为后退按钮创建自定义蒙版图像

转载 作者:行者123 更新时间:2023-12-04 08:57:18 26 4
gpt4 key购买 nike

来自 dox :

  • If you want to use a custom image to replace the default chevron, you also need to create a custom mask image. iOS 7 uses the mask to make the previous screen’s title appear to emerge from—or disappear into—the chevron during navigation transitions. To learn about the properties that control the Back button and mask image, see UINavigationBar Class Reference.


在 UINavigationBar 类引用中:

backIndicatorImage

The image shown beside the back button. @property(nonatomic, retain) UIImage *backIndicatorImage Discussion

If you want to customize the back indicator image, you must also set backIndicatorTransitionMaskImage. Availability

Available in iOS 7.0 and later.

See Also

  @property backIndicatorTransitionMaskImage

Declared In UINavigationBar.h backIndicatorTransitionMaskImage

The image used as a mask for content during push and pop transitions. @property(nonatomic, retain) UIImage *backIndicatorTransitionMaskImage Discussion

If you want to customize the back indicator image, you must also set backIndicatorImage. Availability

Available in iOS 7.0 and later.

See Also

  @property backIndicatorImage

Declared In UINavigationBar.h



请原谅我的无知,但提供的信息并没有告诉我太多。

是否有 cocoa 类可以制作具有所需图像的蒙版?或者我需要提供框架、弧线等吗?或者我只是在编辑器中制作我的图像的黑色轮廓?

最佳答案

我想这就是你要找的

self.navigationController.navigationBar.backIndicatorImage = [UIImage yourImage];
self.navigationController.navigationBar.backIndicatorTransitionMaskImage = [UIImage yourImage];

关于cocoa-touch - 如何在 iOS7 中为后退按钮创建自定义蒙版图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18940010/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com