我发现了这段代码:
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)
我需要做些什么才能将所有其他元素(如导航栏)添加到屏幕截图中?
我要做什么来使用swift从DB(MySQL)获取,发布和检查数据?我可以只创建php页面并联系他们,还是有办法管理它们?如果有,怎么样?