I am using the ImageDesma template and if I put the code in a single image from the bundle, but when I try and load it, then it works very well. I
From the directories I created in my application I can not succeed
Code:
- (AQGridViewCell *) GridView :. (AQGridView *) aGridView cellForItemAtIndex: (NSUInteger) index {static NSString * PlainCellIdentifier = @ "Plensilaidentifayr"; AQGridViewCell * cell = zero; ImageDemoGridViewCell * Plain seal = (ImageDemoGridViewCell *) [aGridView dequeueReusableCellWithIdentifier: Plensilaidentifayr]; If (plainCell == null) {plainCell = [[[ImageDemoGridViewCell alloc] initWithFrame: CGRectMake (0.0, 0.0, 200.0, 150.0) reuseIdentifier: PlainCellIdentifier] autorelease]; Plain seals SelectionGlokar = [UIColor lightGrayColor]; } NSString * fileName = [NSString stringWithFormat: @ "% @ /% @ _ tn.jpg", [manufacturerID stringValue], [[[self.collectionItems objectAtIndex: index] valueForKey: @ "PhotoName"] stringByReplacingOccurrencesOfString: @ "" withString : @ "% 20"]]; NSArray * path = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, yes); NSString * documentsPath = [path objectAtIndex: 0]; NSString * savePath = [DocumentPath StringBaffensePantCompany: Filename]; NSDT * ImageData = Zero; BOOL file attributes = [[NSFileManager default manager] fileExistsAtPath: savePath]; If (fileExists) {imageData = [NSData DataWidth ContentAufFile: SavePath]; } Else {NSString * filePath = [[NSBundle mainBundle] pathForResource: @ "NoImageAvailableThumbNail" type: @ "PNG"]; ImageData = [NSData Datatystem Contentoff file: FilePath]; } UIImage * myImage = [UIImage imageWithData: imageData]; NSLog (@ "% @", myImage); If (myImage == blue) {nslog (@ "no image"); } PlainCell.image = myImage; Cell = plain cell; Return (cell); } I'm using code, which I know is that I work to draw image data because I'm using it in other places in my app and when I set on the property hereby AQGridViewCell:
- (minus) setImage: (UIImage *) anImage {_imageView.image = anImage; [Self setands layout]; }
I do not see the check for your example in the example I Are you sure that it is being loaded properly? Try to create an image on one line and set it to another so you can make it in the debugger. For reference, I use several methods to do something similar to the cache went book cover images in Cobo app do, and it works, however, a difference that I load a UIImage from a PNG file. Something from my mind (UIMAJFFMPNNDAT), such as the iPhone is so far sorry).
The only other thing is that I can check whether the image has been hidden for some reason or not. Printing it in the debugger should tell you that with its size, layout etc.
Comments
Post a Comment