imageByApplyingSymbolConfiguration_ method

UIImage? imageByApplyingSymbolConfiguration_(
  1. UIImageSymbolConfiguration configuration
)

This is a convenience method to apply another symbol configuration over an existing one. If the image doesn't have a symbol configuration, it will just merge the traits of the existing with the new one (where the new traits override the old traits).

Create a new image by applying the specified configuration over the existing one. This only works if the configuration already has a configuration (i.e. is a symbol image). The image will be configured with a combination of both configurations.

If you use this on a symbol image with other layout modifications done (e.g. changed baseline), those changes will be lost and overwritten with the new configuration's layout properties. This applies to size, contentInsets and baseline.

Implementation

UIImage? imageByApplyingSymbolConfiguration_(UIImageSymbolConfiguration configuration) {
  final _ret = _objc_msgSend_62nh5j(this.ref.pointer, _sel_imageByApplyingSymbolConfiguration_, configuration.ref.pointer);
  return _ret.address == 0 ? null : UIImage.castFromPointer(_ret, retain: true, release: true);
}