-(uiimage*) Imagewithimage: (uiimage*) image Scaledtosize: (cgsize) newSize; { uigraphicsbeginimagecontext (newSize); [Image Drawinrect:cgrectmake (0,0, newsize.width,newsize.height)]; UIImage* newimage = uigraphicsgetimagefromcurrentimagecontext (); Uigraphicsendimagecontext (); return newimage;}
Presenting view controllers on detached view controllers is discouraged
Http://stackoverflow.com/questions/19890761/warning-presenting-view-controllers-on-detached-view-controllers-is-discourage
ImageView that can be moved
-(void) touchesmoved: (Nsset *) touches withevent: (uievent *)event { [super touchesmoved: Touches withevent:event]; float deltax = [[Touches Anyobject] locationinview:self].x- [[Touches Anyobject] Previouslocationinview: self].x; float DeltaY = [[Touches Anyobject] locationinview:self].y- [[Touches Anyobject] previouslocationinview:self].y; = Cgaffinetransformtranslate (self.transform, DeltaX, DeltaY);}
Send e-mail
NSData *imageasdata = uiimagepngrepresentation (i); [Mailcontroller addattachmentdata:imageasdata MimeType: @" Image/png " fileName:@"picdecor.png"]; [Mailcontroller setsubject: @" My Picdecor Image " ]; [Self.view.window.rootViewController presentviewcontroller:mailcontroller animated:yes Completion:nil];
IOS6 in practice record 1