iphone - Labels are not getting displayed and image is not getting saved -
i have created uilabels on toolbar, when try using on ios version 4.3 not getting displayed..
labels getting displayed when deployment target 6 when deployment target changed 4.3 not working..
and
i using save button save image in ios 4.3 giving error (ie image not saved). (in ios 5.0 ,5.5 ,6.0 , 6.1 working fine).
i using these code save image (any 1 using).
uiimage *viewimage = [uiimage imagewithdata:[nsdata datawithcontentsofurl:[nsurl urlwithstring:self.imageurl]]]; nslog(@"uiimage : %@",viewimage); alassetslibrary *library = [[alassetslibrary alloc] init]; [library writeimagetosavedphotosalbum:[viewimage cgimage] orientation:(alassetorientation)[viewimage imageorientation] completionblock:^(nsurl *asseturl, nserror *error){ if (error) { nslog(@"error"); } else { nslog(@"url %@", asseturl); [self assigndictonary:viewimage withurl:asseturl withmediatype:@"public.image"]; } }]; [library release];
or
dispatch_async(dispatch_get_global_queue(dispatch_queue_priority_default,(unsigned long)null), ^(void) { uiimagewritetosavedphotosalbum([uiimage imagewithdata:[nsdata datawithcontentsofurl:[nsurl urlwithstring:self.imageurl]]], self, @selector(image:didfinishsavingwitherror:contextinfo:), nil); });
can 1 suggest have display labels on toolbar , save image code work versions on ios.. (ie 4.3, 5.0, 5.1, 6.0, 6.1)..
Comments
Post a Comment