The picture in iOS is stretched, similar to the point 9 picture in Android


UIImage* img=[UIImage imageNamed: @" name.png " ]; // Original image UIEdgeInsets edge=UIEdgeInsetsMake( 0 , 10 , 0 , 10 ); // UIImageResizingModeStretch: stretching mode, by stretching the rectangular area specified by UIEdgeInsets To fill the image // UIImageResizingModeTile: tile mode, fill the image by repeatedly displaying the rectangular area specified by UIEdgeInsets img= [img resizableImageWithCapInsets:edge resizingMode:UIImageResizingModeStretch]; imageView.image=img;

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324603190&siteId=291194637