小编Meh*_*hul的帖子

IOS Xcode验证Xcode.app

我打开Xcode 7.0的所有时间.这样的警报,每次都需要时间.我只想要解决方案从Xcode的开始完全删除此警报..

在打开Xcode的时候,给出警报 - > "验证XCode.app"

请参阅下面给出的屏幕截图

xcode objective-c uialertview ios swift

9
推荐指数
2
解决办法
5809
查看次数

XCODE 6.2不合格的设备IOS 8.3

当我尝试在XCODE 6.2中运行代码时,我收到错误消息.建议我解决方案.

在此输入图像描述

iphone xcode ios xcode6 ios8.3

7
推荐指数
1
解决办法
7701
查看次数

UIImage裁剪透明像素

在使用swift 4从UIImage裁剪透明像素后,我需要帮助来创建完美清晰的图像.

我想用删除透明颜色创建图像,所以为此我使用了下面的代码.但它会模糊图像,出现小的小方形矩形.

使用以下代码

let imageCroppedBg = imgWithClearBackgroung!.cropAlpha()


//UIImage extension
extension UIImage {
    func cropAlpha() -> UIImage {

        let cgImage = self.cgImage!;

        let width = cgImage.width
        let height = cgImage.height

        let colorSpace = CGColorSpaceCreateDeviceRGB()
        let bytesPerPixel:Int = 4
        let bytesPerRow = bytesPerPixel * width
        let bitsPerComponent = 8
        let bitmapInfo: UInt32 = CGImageAlphaInfo.premultipliedLast.rawValue | CGBitmapInfo.byteOrder32Big.rawValue

        guard let context = CGContext(data: nil, width: width, height: height, bitsPerComponent: bitsPerComponent, bytesPerRow: bytesPerRow, space: colorSpace, bitmapInfo: bitmapInfo),
            let ptr = context.data?.assumingMemoryBound(to: UInt8.self) else { …
Run Code Online (Sandbox Code Playgroud)

core-graphics crop uiimage ios swift

5
推荐指数
1
解决办法
789
查看次数

标签 统计

ios ×3

swift ×2

xcode ×2

core-graphics ×1

crop ×1

ios8.3 ×1

iphone ×1

objective-c ×1

uialertview ×1

uiimage ×1

xcode6 ×1