-(void) savepictophotoes
{
Uigraphicsbeginimagecontext (self.view.bounds.size);
Cgcontextref ref = Uigraphicsgetcurrentcontext ();
[_board.layer Renderincontext:ref];
UIImage *img = Uigraphicsgetimagefromcurrentimagecontext ();
Uiimagewritetosavedphotosalbum (IMG, self, @selector (image:didFinishSavingWithError:contextInfo:), nil);
}
#pragma mark display prompt box
-(void) Image: (UIImage *) image didfinishsavingwitherror: (nserror *) error ContextInfo: (void *) contextinfo{
Create alert
Uialertcontroller *alert = [Uialertcontroller alertcontrollerwithtitle:@ "Picture saved to album" Message:nil PreferredStyle: Uialertcontrollerstylealert];
Create action
Uialertaction *action = [uialertaction actionwithtitle:@ "OK" style:uialertactionstyledefault Handler:nil];
[Alert addaction:action];
[Self Presentviewcontroller:alert animated:yes completion:nil];
}
Uiimagewritetosavedphotosalbum save images from your app to a user's iphone or itouch album