小编Pie*_*ada的帖子

如何在Swift中使用全屏截图?

我发现了这段代码:

func screenShotMethod() {
    //Create the UIImage
    UIGraphicsBeginImageContext(view.frame.size)
    view.layer.renderInContext(UIGraphicsGetCurrentContext())
    let image = UIGraphicsGetImageFromCurrentImageContext()
    UIGraphicsEndImageContext()
    //Save it to the camera roll
    UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
}
Run Code Online (Sandbox Code Playgroud)

我需要做些什么才能将所有其他元素(如导航栏)添加到屏幕截图中?

screenshot uiimage ios swift

64
推荐指数
6
解决办法
6万
查看次数

MySQL在线数据库访问swift

我要做什么来使用swift从DB(MySQL)获取,发布和检查数据?我可以只创建php页面并联系他们,还是有办法管理它们?如果有,怎么样?

mysql database iphone ios swift

3
推荐指数
1
解决办法
7727
查看次数

标签 统计

ios ×2

swift ×2

database ×1

iphone ×1

mysql ×1

screenshot ×1

uiimage ×1