Search Results

Search found 779 results on 32 pages for 'uiimage'.

Page 6/32 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • How to save a png image to camera roll?

    - by Napolit
    I'd like to save screenshots from my game to camera roll. Right now I'm using UIImageWriteToSavedPhotosAlbum which saves the image in jpg format with way too much ugly jpg artifacts. Is there a way to save an UIImage in png format to camera roll?

    Read the article

  • Xcode: How to change Image on Touching at an Image (same Position)?

    - by Markus S.
    Simply, I have placed an image with the Interface Builder in a UIView. Now I want to run a method/function when I am touching that image, for example when another image should be loaded. My Code: - (void)touchesended:(NSSet*) touches withEvent:(UIEvent *)event { // UITouch *touch = [touch anyObject]; bild_1_1.image = [UIImage imageNamed:@"t_1_4.jpg"]; //} }

    Read the article

  • NSArray in NSArray do not return the image I want

    - by Tibi
    Hi there, I've got a code snippet here that I can't make working. NSUInteger i; //NSMutableArray *textures = [[NSMutableArray alloc] initWithCapacity:kNumTextures]; //NSMutableArray *texturesHighlighted = [[NSMutableArray alloc] initWithCapacity:kNumTextures]; NSMutableArray *textures= [[NSMutableArray alloc] init]; for (i = 1; i <= kNumTextures; i++) { NSString *imageName = [NSString stringWithFormat:@"texture%d.png", i]; NSString *imageNameHighlighted = [NSString stringWithFormat:@"texture%d_select.png", i]; UIImage *image = [UIImage imageNamed:imageName]; UIImage *imageHighlighted = [UIImage imageNamed:imageNameHighlighted]; //NSArray *pics = [[NSArray alloc] initWithObjects:(UIImage)image,(UIImage)imageHighlighted,nil]; NSArray *pics = [NSArray arrayWithObjects:image,imageHighlighted,nil]; [textures addObject:pics]; [pics release]; } //select randomly the position of the picture that will be represented twice on the board NSInteger randomTexture = arc4random()%([textures count]+1); //extract image corresponding to the randomly selected index //remove corresponding pictures from textures array NSArray *coupleTexture = [textures objectAtIndex:randomTexture]; [textures removeObjectAtIndex:randomTexture]; //create the image array containing 1 couple + all other pictures NSMutableArray *texturesBoard = [[NSMutableArray alloc] initWithCapacity:kNumPotatoes]; [texturesBoard addObject:coupleTexture]; [texturesBoard addObject:coupleTexture]; [coupleTexture release]; NSArray *pics = [[NSArray alloc] init]; for (pics in textures) { [texturesBoard addObject:pics]; } [pics release]; //shuffle the textures //[texturesBoard shuffledMutableArray]; //Array with masks NSMutableArray *masks= [[NSMutableArray alloc] init]; for (i = 1; i <= kNumMasks; i++) { NSString *maskName = [NSString stringWithFormat:@"mask%d.png", i]; UIImage *mask = [UIImage imageNamed:maskName]; //NSArray *pics = [[NSArray alloc] initWithObjects:mask,nil]; [masks addObject:mask]; //[pics release]; [maskName release]; [mask release]; } //Now mask all images in texturesBoard NSMutableArray *list = [[NSMutableArray alloc] init]; for (i = 0; i <= kNumMasks-1; i++) { //take on image couple from textures NSArray *imgArray = [texturesBoard objectAtIndex:i]; UIImage *mask = [masks objectAtIndex:i]; //mask it with the mask un the array at corresponding index UIImage *img1 =(UIImage *) [imgArray objectAtIndex:0]; UIImage *img2 =(UIImage *) [imgArray objectAtIndex:1]; UIImage *picsMasked = [self maskImage:(UIImage *)img1 withMask:(UIImage *)mask]; UIImage *picsHighlightedMasked = [self maskImage:(UIImage *)img2 withMask:(UIImage *)mask]; //Init image with highlighted status TapDetectingImageView *imageView = [[TapDetectingImageView alloc] initWithImage:picsMasked imageHighlighted:picsHighlightedMasked]; [list addObject:imageView]; } The problem here is that : img1 and img2, are not images but rather NSArray with multiple entries. Ican't figure why... dos any fresh spirit here could provide me with some clue to fix. maaany thanks.

    Read the article

  • How to convert CFDataRef data to UIImage / NSData - Iphone

    - by sagar
    Hello ! every one. I am having a little query regarding CFData in Objective C / iPhone Development. See, Apple documentation has following method for CGPDFStream CGPDFStreamCopyData(<#CGPDFStreamRef stream#>, <#CGPDFDataFormat *format#>) Above method return type is CGDataRef. I have data as stream. Now I wish to convert in image. & For that I think I should follow this way. CGPDFDataFormat t=CGPDFDataFormatJPEG2000; CFDataRef data = CGPDFStreamCopyData (stream, &t); After executing above statements - I have some reference in data variable. Now my Query is - How to convert this CFData to NSData or UIImage ? I have gone through the documentation of apple - But I am failure to find it. Thanks in advance for sharing your knowledge. Sagar

    Read the article

  • Optimized Image Loading in a UIScrollView

    - by Michael Gaylord
    I have a UIScrollView that has a set of images loaded side-by-side inside it. You can see an example of my app here: http://www.42restaurants.com. My problem comes in with memory usage. I want to lazy load the images as they are about to appear on the screen and unload images that aren't on screen. As you can see in the code I work out at a minimum which image I need to load and then assign the loading portion to an NSOperation and place it on an NSOperationQueue. Everything works great apart from a jerky scrolling experience. I don't know if anyone has any ideas as to how I can make this even more optimized, so that the loading time of each image is minimized or so that the scrolling is less jerky. - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ [self manageThumbs]; } - (void) manageThumbs{ int centerIndex = [self centerThumbIndex]; if(lastCenterIndex == centerIndex){ return; } if(centerIndex >= totalThumbs){ return; } NSRange unloadRange; NSRange loadRange; int totalChange = lastCenterIndex - centerIndex; if(totalChange > 0){ //scrolling backwards loadRange.length = fabsf(totalChange); loadRange.location = centerIndex - 5; unloadRange.length = fabsf(totalChange); unloadRange.location = centerIndex + 6; }else if(totalChange < 0){ //scrolling forwards unloadRange.length = fabsf(totalChange); unloadRange.location = centerIndex - 6; loadRange.length = fabsf(totalChange); loadRange.location = centerIndex + 5; } [self unloadImages:unloadRange]; [self loadImages:loadRange]; lastCenterIndex = centerIndex; return; } - (void) unloadImages:(NSRange)range{ UIScrollView *scrollView = (UIScrollView *)[[self.view subviews] objectAtIndex:0]; for(int i = 0; i < range.length && range.location + i < [scrollView.subviews count]; i++){ UIView *subview = [scrollView.subviews objectAtIndex:(range.location + i)]; if(subview != nil && [subview isKindOfClass:[ThumbnailView class]]){ ThumbnailView *thumbView = (ThumbnailView *)subview; if(thumbView.loaded){ UnloadImageOperation *unloadOperation = [[UnloadImageOperation alloc] initWithOperableImage:thumbView]; [queue addOperation:unloadOperation]; [unloadOperation release]; } } } } - (void) loadImages:(NSRange)range{ UIScrollView *scrollView = (UIScrollView *)[[self.view subviews] objectAtIndex:0]; for(int i = 0; i < range.length && range.location + i < [scrollView.subviews count]; i++){ UIView *subview = [scrollView.subviews objectAtIndex:(range.location + i)]; if(subview != nil && [subview isKindOfClass:[ThumbnailView class]]){ ThumbnailView *thumbView = (ThumbnailView *)subview; if(!thumbView.loaded){ LoadImageOperation *loadOperation = [[LoadImageOperation alloc] initWithOperableImage:thumbView]; [queue addOperation:loadOperation]; [loadOperation release]; } } } } EDIT: Thanks for the really great responses. Here is my NSOperation code and ThumbnailView code. I tried a couple of things over the weekend but I only managed to improve performance by suspending the operation queue during scrolling and resuming it when scrolling is finished. Here are my code snippets: //In the init method queue = [[NSOperationQueue alloc] init]; [queue setMaxConcurrentOperationCount:4]; //In the thumbnail view the loadImage and unloadImage methods - (void) loadImage{ if(!loaded){ NSString *filename = [NSString stringWithFormat:@"%03d-cover-front", recipe.identifier, recipe.identifier]; NSString *directory = [NSString stringWithFormat:@"RestaurantContent/%03d", recipe.identifier]; NSString *path = [[NSBundle mainBundle] pathForResource:filename ofType:@"png" inDirectory:directory]; UIImage *image = [UIImage imageWithContentsOfFile:path]; imageView = [[ImageView alloc] initWithImage:image andFrame:CGRectMake(0.0f, 0.0f, 176.0f, 262.0f)]; [self addSubview:imageView]; [self sendSubviewToBack:imageView]; [imageView release]; loaded = YES; } } - (void) unloadImage{ if(loaded){ [imageView removeFromSuperview]; imageView = nil; loaded = NO; } } Then my load and unload operations: - (id) initWithOperableImage:(id<OperableImage>) anOperableImage{ self = [super init]; if (self != nil) { self.image = anOperableImage; } return self; } //This is the main method in the load image operation - (void)main { [image loadImage]; } //This is the main method in the unload image operation - (void)main { [image unloadImage]; }

    Read the article

  • UIScrollView and UIImage in it with paging enabled

    - by Infinity
    Hello guys! I need to display 10 - 1000 images on a UIScrollView. Paging is enabled. So every page of the scrollview is an image, it is an uiimage. I can load 10 images to 10 uiimages which stays in the memory, but with 1000 images I have problems on the iPhone or on the iPad. I am trying to unload and then load the images when I am doing scrolling. I every time displays 3 images. The current page image, and the -1 and +1 pages. When I am scrolling I unload the image and then load the next. With this method I have two problems. The scrolling is laggy and if I scroll very fast the images don't appear. Maybe is there any good solution for these problems? Can you suggest me one?

    Read the article

  • CGContextSetRBStrokeColor to replace, not add, for alpha?

    - by Peter Hajas
    I use CGContexts to allow the user to draw in my application, here's an example: CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound); CGContextSetLineWidth(UIGraphicsGetCurrentContext(), size); CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(),r,g,b,a); I want the user to have an "eraser" tool that actually erases - it can't draw white (that would add white to the image, which may not have a white background) or alpha (or else the stroke won't do anything). Is there a way to do this? Perhaps replacing contents of a CGContext or UIImage?

    Read the article

  • Sometimes UIImageView seems to reject the image taken with iPhone Camera

    - by maxbareis
    Hi, it is very strange, because this error doesn't happen all the time... I have the following code: - (IBAction)getPhoto:(id)sender { UIImagePickerController * picker = [[UIImagePickerController alloc] init]; picker.delegate = self; #if TARGET_IPHONE_SIMULATOR picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; #else picker.sourceType = UIImagePickerControllerSourceTypeCamera; #endif [self presentModalViewController:picker animated:YES]; } with the corresponding delegated selector - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage *image = [[info objectForKey:@"UIImagePickerControllerOriginalImage"] imageByScalingToSize:CGSizeMake(480, 320)]; [[self imageView] setImage:image]; [picker dismissModalViewControllerAnimated:YES]; } strange thing is, somtimes the image appears in imageView and sometimes not. I have called (gdb) po UIImagePNGRepresentation(image) right after setImage and stuffed the output into a file. The file is a perfect png. Has anyone experienced the same? Has anyone found a solution for it? Thanks in advance Max

    Read the article

  • Dispelling the UIImage imageNamed: FUD

    - by Roger Nolan
    I see a lot of people saying imageNamed is bad but equal numbers of people saying the performance is good - especially when rendering UITableViews. See this SO question for example or this article on iPhoneDeveloperTips.com UIImage's imageNamed method used to leak so it was best avoided but has been fixed in recent releases. I'd like to understand the caching algorithm better in order to make a reasoned decision about where I can trust the system to cache my images and where I need to go the extra mile and do it myself. My current basic understanding is that it's a simple NSMutableDictionary of UIImages referenced by filename. It gets bigger and when memory runs out it gets a lot smaller. For example, does anyone know for sure that the image cache behind imageNamed does not respond to didReceiveMemoryWarning? It seems unlikely that Apple would not do this. If you have any insight into the caching algorithm, please post it here.

    Read the article

  • custom UIButton with skewed area in iPhone

    - by sugar
    I want to have a button on a screen with this image. this image is transparent from its corners as you can see here. UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom]; [btn setFrame:CGRectMake(xCo, yCo, kImageSizeWidth, kImageSizeHeight)]; [btn setImage:[UIImage imageNamed:@"aboveImg.png"] forState:UIControlStateNormal]; [btn addTarget:self action:@selector(btnTapped:) forControlEvents:UIControlEventTouchDown]; But the button tap is recognized out side image & i don't want that kind of functionality. I mean tap must be recognized only when it is tapped within image not outside image. How is that possible ? Thanks in advance for sharing your great knowledge. Sagar.

    Read the article

  • Is there an optimal way to render images in cocoa? Im using setNeedsDisplay

    - by Edward An
    Currently, any time I manually move a UIImage (via handling the touchesMoved event) the last thing I call in that event is [self setNeedsDisplay], which effectively redraws the entire view. My images are also being animated, so every time a frame of animation changes, i have to call setNeedsDisplay. I find this to be horrific since I don't expect iphone/cocoa to be able to perform such frequent screen redraws very quickly. Is there an optimal, more efficient way that I could be doing this? Perhaps somehow telling cocoa to update only a particular region of the screen (the rect region of the image)?

    Read the article

  • Fullscreen iPhone animation from PNG

    - by Sergey
    Hi, I need in animation of sequence of more PNG files (300 png files and size is 320x480). I've try make it with 12 fps, but sometime iPhone 3g have lags... 3gs working fine. I think 2g working with lags always. I've use one UIImageView and loading images in NStimer callback by UIImage:imageWithContentOfFile. May be this is not best way to animation png files ? note: previously i've used ImageOptim to pack (or strip ??) all my images (from 20% to 80% of size strip). regards,

    Read the article

  • iPhone UIImage Display Controller

    - by Bill Shiff
    Hello, I would like to be able to display a UIImage from within my app and support a lot of the functionality available in the built-in Photos app (i.e., pinch-to-zoom, pan, etc). I don't really want to write a bunch of code that someone has already written, so I'm wondering if there is a library out there already that I could just import into my project. I'm aware of the Three20 project, but I don't want to import a huge library if I don't have to. Is anyone aware of an available library that's already out there for displaying UIImages? Or part of some open-source project that can be pulled out on its own? Thanks!

    Read the article

  • iPhone UIImage number recognition

    - by Skeep
    Hi All, I have a small UIImage (jpg) with a single typed number. I want to be able to read the number with some kind of pattern recognition. I'm really not sure where to start, so any help would be appreciated. my initial idea was to compare this image with other images. For instance compare the image with that of a 1,2,3, etc until a match was found. That just seems slow and cumbersome and wondered if there was a better way to do it? Thanks

    Read the article

  • iPhone animation with stretchable image

    - by ryyst
    I got a UIView subclass that draws a UIImage as its background. The image is created using the stretchableImageWithLeftCapWidth:topCapHeight: method, it has round edges. I also use an animation block inside of which I resize my view. I had hoped that during animation, the drawRect:method would get called sometimes, which would result in the background image getting drawn correctly. Unfortunately, the animation seems to render the image and then just rescale it during the animation, which obviously makes the formerly round edges getting nastily stretched. The only workaround I can imagine is put three separate UIImageViews (top cap, middle fill, bottom cap) above my original background image and then reposition the caps images and scaling the fill image. However, this seems quite complicated... Is there any better way I can prevent this from happening?

    Read the article

  • how to aggregate information on UIImage?

    - by user1582281
    I want to draw on each drawing cycle 1000 more lines on my UIIMage, right now I do it by : -(void)drawRect { for(int i=0;i<1000;i++) { UIGraphicsBeginImageContext(myImage.size); code to draw line on current context... draw previous info from myImage: [myImage drawInRect:myRect]; //store info from context back to myImage myImage=UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); } //append the image on the right side of current context: [myImage drawInRect:myRightRect]; } problem is that I think that drawing entire image each time just for the few lines added is very expensive, anyone has any idea how to optimize it?

    Read the article

  • adding UIImageView to UIScrollView throws exception cocoa touch for iPad

    - by Brodie4598
    I am a noob at OBJ-C :) I am trying to add a UIImageView to a UIScrollView to display a large image in my iPad app. I have followed the tutorial here exactly: http://howtomakeiphoneapps.com/2009/12/how-to-use-uiscrollview-in-your-iphone-app/ The only difference is that in my App the View is in a seperate tab and I am using a different image. here is my code: - (void)viewDidLoad { [super viewDidLoad]; UIImageView *tempImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Cheyenne81"]]; self.imageView = tempImageView; [tempImageView release]; scrollView.contentSize = CGSizeMake(imageView.frame.size.width, imageView.frame.size.height); scrollView.maximumZoomScale = 4.0; scrollView.minimumZoomScale = 0.75; scrollView.clipsToBounds = YES; scrollView.delegate = self; [scrollView addSubview:imageView]; } - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{ return imageView; } and: @interface UseScrollViewViewController : UIViewController<UIScrollViewDelegate>{ IBOutlet UIScrollView *scrollView; UIImageView *imageView; } @property (nonatomic, retain) UIScrollView *scrollView; @property (nonatomic, retain) UIImageView *imageView; @end I then create a UIScrollView in Interface Builder and link it to the scrollView outlet. Thats when I get the problem. When I run the program it crashes instantly. If I run it without linking the scrollView to the outlet, it will run (allbeit with a blnk screen). The following is the error I get in the console: 2010-03-27 20:18:13.467 UseScrollViewViewController[7421:207] * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key scrollView.'

    Read the article

  • Problem in cropping the UIImage using CGContext?

    - by Rajendra Bhole
    Hi, I developing the simple UIApplication in which i want to crop the UIImage (in .jpg format) with help of CGContext. The developed code till now as follows, CGImageRef graphicOriginalImage = [originalImage.image CGImage]; UIGraphicsBeginImageContext(originalImage.image.size); CGContextRef ctx = UIGraphicsGetCurrentContext(); CGBitmapContextCreateImage(graphicOriginalImage); CGFloat fltW = originalImage.image.size.width; CGFloat fltH = originalImage.image.size.height; CGFloat X = round(fltW/4); CGFloat Y =round(fltH/4); CGFloat width = round(X + (fltW/2)); CGFloat height = round(Y + (fltH/2)); CGContextTranslateCTM(ctx, 0, image.size.height); CGContextScaleCTM(ctx, 1.0, -1.0); CGRect rect = CGRectMake(X,Y ,width ,height); CGContextDrawImage(ctx, rect, graphicOriginalImage); croppedImage = UIGraphicsGetImageFromCurrentImageContext(); return croppedImage; } The above code is worked fine but it can't crop image. The original image memory and cropped image memory i will got same(equal to original image memory). The above code is right for cropping the image?????????????????? How i cropping the image (in behind pixels should also be crop) from the center of the image???????????? I already wasting a lot of time for developing the above code , but i didn't get answer or way to find out how to crop the image.Thanks for sending me answer in advanced.

    Read the article

  • Signal "0" error while scrolling a tableview with images

    - by Amitkumar
    Hi, I have a problem while scrolling images on tableview. I am getting a Signal "0" error. I think it is due to some memory issues but I am not able to find out the exact error. The code is as follows, - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [travelSummeryPhotosTable dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]autorelease]; } //Photo ImageView UIImageView *photoTag = [[UIImageView alloc] initWithFrame:CGRectMake(5.0, 5.0, 85.0, 85.0)]; NSString *rowPath =[[imagePathsDictionary valueForKey:[summaryTableViewDataArray objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row]; photoTag.image = [UIImage imageWithContentsOfFile:rowPath]; [cell.contentView addSubview:photoTag]; [photoTag release]; // Image Caption UILabel *labelImageCaption = [[UILabel alloc] initWithFrame:CGRectMake(110.0, 15.0, 190.0, 50.0)]; labelImageCaption.textAlignment = UITextAlignmentLeft; NSString *imageCaptionText =[ [imageCaptionsDictionary valueForKey:[summaryTableViewDataArray objectAtIndex:indexPath.section]] objectAtIndex:indexPath.row]; labelImageCaption.text = imageCaptionText; [cell.contentView addSubview:labelImageCaption]; [labelImageCaption release]; return cell; } Thanks in advance.

    Read the article

  • Error when creating an image from a UIView

    - by Raphael Pinto
    Hi, I'm creating an image from a view whith the folowing code : UIGraphicsBeginImageContext(myView.bounds.size); [myView.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil); The image is created in the user album but in the consol I get this : 2010-05-11 10:17:17.974 myApp[3875:1807] sqlite error 8 [attempt to write a readonly database] 2010-05-11 10:17:18.014 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3d87f 0x34e3b029 0x34e3b22b 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 0x3034a12c) 2010-05-11 10:17:18.077 myApp[3875:1807] sqlite error 8 [attempt to write a readonly database] 2010-05-11 10:17:18.087 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3b053 0x34e3b22b 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 0x3034a12c) 2010-05-11 10:17:18.091 myApp[3875:1807] sqlite error 8 [attempt to write a readonly database] 2010-05-11 10:17:18.095 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3b085 0x34e3b22b 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 0x3034a12c) 2010-05-11 10:17:18.111 myApp[3875:1807] sqlite error 1 [SQL logic error or missing database] 2010-05-11 10:17:18.115 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3d87f 0x34e3b029 0x34e3b4dd 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 0x3034a12c) 2010-05-11 10:17:18.120 myApp[3875:1807] sqlite error 1 [SQL logic error or missing database] 2010-05-11 10:17:18.124 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3b053 0x34e3b4dd 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 0x3034a12c) 2010-05-11 10:17:18.129 myApp[3875:1807] sqlite error 1 [cannot commit - no transaction is active] 2010-05-11 10:17:18.133 myApp[3875:1807] Backtrace for sqlite error: (0x34e3a909 0x34e3b085 0x34e3b4dd 0x34e2f48b 0x34e2dccb 0x34e2d2f7 0x34e2d3bb 0x34e4dcd3 0x34e50515 0x34e51351 0x34e51681 0x34e513f5 0x34e511e3 0x303af57c 0x34e51163 0x303b06e8 0x303ac8e0 0x303ac6d8 0x303ac8c8 0x303aca80 0x30350d55 I don't know where the problem come from. Can you help me?

    Read the article

  • how to change the image on click from database

    - by iosdev
    In my application i having multiple image in sq lite database,Since i want to change to the next image on button click,Here my code, -(void)Readthesqlitefile:(NSInteger *)sno { sqlite3 *database;//database object NSString *docpath=[self doccumentspath];//get sqlite path const char *ch=[docpath UTF8String];//string to constant char UTF8string main part to connect DB if (sqlite3_open(ch, &database)==SQLITE_OK) { const char *chstmt="SELECT * FROM animal where rowid= = %d",sno; sqlite3_stmt *sqlstmt;//to execute the above statement if (sqlite3_prepare_v2(database, chstmt, -1, &sqlstmt, NULL)==SQLITE_OK) { while (sqlite3_step(sqlstmt)==SQLITE_ROW) { const char *Bname=(char *)sqlite3_column_text(sqlstmt, 0); //converting const char to nsstring NSString *Bndname=[NSString stringWithFormat:@"%s",Bname]; NSLog(@"Brand Names=%@",Bndname); lb1.text=[NSString stringWithFormat:Bndname]; NSUInteger legnt=sqlite3_column_bytes(sqlstmt, 1); if (legnt>0) { NSData *dt=[NSData dataWithBytes:sqlite3_column_blob(sqlstmt, 1) length:legnt]; clsimg=[UIImage imageWithData:dt];//converting data to image imager.image=clsimg; } else { clsimg=nil; } } } sqlite3_finalize(sqlstmt); } sqlite3_close(database); } Button click function -(IBAction)changenext { int j; for (j=1; j<10; j++) { [self Readthesqlitefile:j]; } } its is not working pls help me to solve it out?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >