• Apfeltalk ändert einen Teil seiner Allgemeinen Geschäftsbedingungen (AGB), das Löschen von Useraccounts betreffend.
    Näheres könnt Ihr hier nachlesen: AGB-Änderung
  • Die Bildungsoffensive hier im Forum geht weiter! Jetzt sollen Kreativität und technische Möglichkeiten einen neue Dimension erreichen. Das Thema in diesem Monat lautet - Verkehrte Welt - Hier geht es lang --> Klick

Hinzufügen von View nach dem Parsing crasht App

skydiver12481

Granny Smith
Registriert
24.02.11
Beiträge
14
Hallo Leute,

ich hätte hier ein etwas delikates Problem. Ich versuche nun schon seit 2 Tagen nach dem Parsen einer XML-Datei mit Daten von Bildern(Was auch schön funktioniert) einen CustomImagePickercontroller einzubauen was jedesmal mit einem Crash endet sobald ich im Pickercontroller einen Button aktiviere. Was mache ich das falsch?? Hier mein Code:

Code:
[COLOR=#6E371A]#import "PicViewController.h"[/COLOR]
#import [COLOR=#BF1D1A]"PicGalleryViewController.h"[/COLOR]


[COLOR=#A61390]@implementation[/COLOR] PicGalleryViewController

[COLOR=#A61390]@synthesize[/COLOR] selectGal;
[COLOR=#A61390]@synthesize[/COLOR] selectGalTitle;
[COLOR=#A61390]@synthesize[/COLOR] currentElement, currentImg;
[COLOR=#A61390]@synthesize[/COLOR] galParser;
[COLOR=#A61390]@synthesize[/COLOR] Images;
[COLOR=#A61390]@synthesize[/COLOR] img;
[COLOR=#A61390]@synthesize[/COLOR] GalTable;




[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]viewDidAppear[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][COLOR=#A61390]BOOL[/COLOR][COLOR=#002200])[/COLOR]animated [COLOR=#002200]{[/COLOR]
        [COLOR=#A61390]if[/COLOR][COLOR=#002200]([/COLOR][COLOR=#002200][[/COLOR]Images count[COLOR=#002200]][/COLOR][COLOR=#002200]==[/COLOR]0[COLOR=#002200])[/COLOR][COLOR=#002200]{[/COLOR]
                [URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR] path [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] stringWithFormat[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"http://www.xxx.de/export/gp%@.xml"[/COLOR],selectGal[COLOR=#002200]][/COLOR];
                [COLOR=#002200][[/COLOR]self parseXMLFileAtURL[COLOR=#002200]:[/COLOR]path[COLOR=#002200]][/COLOR];
                self.navigationItem.title [COLOR=#002200]=[/COLOR] selectGalTitle;
                self.view.backgroundColor [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR]UIColor alloc[COLOR=#002200]][/COLOR] initWithPatternImage[COLOR=#002200]:[/COLOR] [COLOR=#002200][[/COLOR]UIImage imageNamed[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"cx_bg02.png"[/COLOR][COLOR=#002200]][/COLOR][COLOR=#002200]][/COLOR];        
                
        [COLOR=#002200]}[/COLOR]
    
        
        [COLOR=#002200][[/COLOR]super viewDidAppear[COLOR=#002200]:[/COLOR]animated[COLOR=#002200]][/COLOR];
        
[COLOR=#002200]}[/COLOR]

[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]parseXMLFileAtURL[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]URL[COLOR=#002200]{[/COLOR]
        
        Images [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableArray_Class/"][COLOR=#400080]NSMutableArray[/COLOR][/URL] alloc[COLOR=#002200]][/COLOR] init[COLOR=#002200]][/COLOR];
        [URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/"][COLOR=#400080]NSURL[/COLOR][/URL] [COLOR=#002200]*[/COLOR]xmlURL [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/"][COLOR=#400080]NSURL[/COLOR][/URL] URLWithString[COLOR=#002200]:[/COLOR]URL[COLOR=#002200]][/COLOR];
        
        galParser [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSXMLParser_Class/"][COLOR=#400080]NSXMLParser[/COLOR][/URL] alloc[COLOR=#002200]][/COLOR] initWithContentsOfURL[COLOR=#002200]:[/COLOR]xmlURL[COLOR=#002200]][/COLOR];
        
        [COLOR=#002200][[/COLOR]galParser setDelegate[COLOR=#002200]:[/COLOR]self[COLOR=#002200]][/COLOR];
        [COLOR=#002200][[/COLOR]galParser setShouldProcessNamespaces[COLOR=#002200]:[/COLOR][COLOR=#A61390]NO[/COLOR][COLOR=#002200]][/COLOR];
        [COLOR=#002200][[/COLOR]galParser setShouldReportNamespacePrefixes[COLOR=#002200]:[/COLOR][COLOR=#A61390]NO[/COLOR][COLOR=#002200]][/COLOR];
        [COLOR=#002200][[/COLOR]galParser setShouldResolveExternalEntities[COLOR=#002200]:[/COLOR][COLOR=#A61390]NO[/COLOR][COLOR=#002200]][/COLOR];
        
        [COLOR=#002200][[/COLOR]galParser parse[COLOR=#002200]][/COLOR];
        [COLOR=#002200][[/COLOR]galParser release[COLOR=#002200]][/COLOR];
        
[COLOR=#002200]}[/COLOR]

[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]parser[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSXMLParser_Class/"][COLOR=#400080]NSXMLParser[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]parser parseErrorOccured[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSError_Class/"][COLOR=#400080]NSError[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]parseError[COLOR=#002200]{[/COLOR]
        [URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR]errorString [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] stringWithFormat[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"Keine Videos verfügbar(ErrorCode %i)"[/COLOR],[COLOR=#002200][[/COLOR]parseError code[COLOR=#002200]][/COLOR][COLOR=#002200]][/COLOR];
        NSLog[COLOR=#002200]([/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"Error parsing XML:%@"[/COLOR], errorString[COLOR=#002200])[/COLOR];
        UIAlertView [COLOR=#002200]*[/COLOR] errorAlert [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR]UIAlertView alloc[COLOR=#002200]][/COLOR]initWithTitle[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"Error loading content"[/COLOR] message[COLOR=#002200]:[/COLOR]errorString delegate[COLOR=#002200]:[/COLOR]self cancelButtonTitle[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"OK"[/COLOR] otherButtonTitles[COLOR=#002200]:[/COLOR][COLOR=#A61390]nil[/COLOR][COLOR=#002200]][/COLOR];
        [COLOR=#002200][[/COLOR]errorAlert show[COLOR=#002200]][/COLOR];
        [COLOR=#002200][[/COLOR]errorAlert release[COLOR=#002200]][/COLOR];
        
[COLOR=#002200]}[/COLOR]

[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]parserDidStartDocument[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSXMLParser_Class/"][COLOR=#400080]NSXMLParser[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]parser[COLOR=#002200]{[/COLOR]
        NSLog[COLOR=#002200]([/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"Starte Parsing"[/COLOR][COLOR=#002200])[/COLOR];


        
        
        
[COLOR=#002200]}[/COLOR]

[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]parser[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSXMLParser_Class/"][COLOR=#400080]NSXMLParser[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]parser didStartElement[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]elementName namespaceURI[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]namespaceURI qualifiedName[COLOR=#002200]:[/COLOR]
[COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]qName attributes[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/"][COLOR=#400080]NSDictionary[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]attributeDict[COLOR=#002200]{[/COLOR]
        currentElement [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR]elementName copy[COLOR=#002200]][/COLOR];
        [COLOR=#A61390]if[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#002200][[/COLOR]elementName  isEqualToString[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"galimg"[/COLOR][COLOR=#002200]][/COLOR][COLOR=#002200])[/COLOR][COLOR=#002200]{[/COLOR]
                
                img [COLOR=#002200]=[/COLOR][COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/"][COLOR=#400080]NSMutableDictionary[/COLOR][/URL] alloc[COLOR=#002200]][/COLOR]init[COLOR=#002200]][/COLOR];
                currentImg [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableString_Class/"][COLOR=#400080]NSMutableString[/COLOR][/URL] alloc[COLOR=#002200]][/COLOR]init[COLOR=#002200]][/COLOR];
                
        [COLOR=#002200]}[/COLOR]
        
[COLOR=#002200]}[/COLOR]


[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]parser[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSXMLParser_Class/"][COLOR=#400080]NSXMLParser[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]parser foundCharacters[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR][COLOR=#A61390]string[/COLOR] [COLOR=#002200]{[/COLOR]
        [COLOR=#A61390]if[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#002200][[/COLOR]currentElement isEqualToString[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"gimg"[/COLOR][COLOR=#002200]][/COLOR][COLOR=#002200])[/COLOR][COLOR=#002200]{[/COLOR]
                [COLOR=#002200][[/COLOR]currentImg appendString[COLOR=#002200]:[/COLOR][COLOR=#A61390]string[/COLOR][COLOR=#002200]][/COLOR];
        [COLOR=#002200]}[/COLOR]
        
                
[COLOR=#002200]}[/COLOR]

[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]parser[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSXMLParser_Class/"][COLOR=#400080]NSXMLParser[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]parser didEndElement[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]elementName namespaceURI[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]namespaceURI qualifiedName[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]qName[COLOR=#002200]{[/COLOR]
        
        [COLOR=#A61390]if[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#002200][[/COLOR]elementName isEqualToString[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"galimg"[/COLOR][COLOR=#002200]][/COLOR][COLOR=#002200])[/COLOR][COLOR=#002200]{[/COLOR]
                
                [COLOR=#002200][[/COLOR]img setObject[COLOR=#002200]:[/COLOR]currentImg forKey[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"img"[/COLOR][COLOR=#002200]][/COLOR];
                [COLOR=#002200][[/COLOR]Images addObject[COLOR=#002200]:[/COLOR][COLOR=#002200][[/COLOR]img copy[COLOR=#002200]][/COLOR][COLOR=#002200]][/COLOR];
                NSLog[COLOR=#002200]([/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"Hinzufügen einer nachricht %@"[/COLOR],currentImg[COLOR=#002200])[/COLOR];
                [COLOR=#002200][[/COLOR]img release[COLOR=#002200]][/COLOR];
        
        [COLOR=#002200]}[/COLOR]
[COLOR=#002200]}[/COLOR]


[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]parserDidEndDocument[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSXMLParser_Class/"][COLOR=#400080]NSXMLParser[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]parser[COLOR=#002200]{[/COLOR]
        NSLog[COLOR=#002200]([/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"Parsen beendet"[/COLOR][COLOR=#002200])[/COLOR];
        NSLog[COLOR=#002200]([/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"Anzahl eingelesener Elemente: %d"[/COLOR], [COLOR=#002200][[/COLOR]Images count[COLOR=#002200]][/COLOR][COLOR=#002200])[/COLOR];
        [COLOR=#002200][[/COLOR]GalTable reloadData[COLOR=#002200]][/COLOR];
        
[COLOR=#002200]}[/COLOR]






[COLOR=#11740A][I]// Customize the number of sections in the table view.[/I][/COLOR]
[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR]NSInteger[COLOR=#002200])[/COLOR]numberOfSectionsInTableView[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR]UITableView [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]tableView [COLOR=#002200]{[/COLOR]
    [COLOR=#A61390]return[/COLOR] [COLOR=#2400D9]1[/COLOR];
[COLOR=#002200]}[/COLOR]


[COLOR=#11740A][I]// Customize the number of rows in the table view.[/I][/COLOR]
[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR]NSInteger[COLOR=#002200])[/COLOR]tableView[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR]UITableView [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]tableView numberOfRowsInSection[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR]NSInteger[COLOR=#002200])[/COLOR]section [COLOR=#002200]{[/COLOR]
    [COLOR=#A61390]return[/COLOR] [COLOR=#002200][[/COLOR]Images count[COLOR=#002200]][/COLOR];
[COLOR=#002200]}[/COLOR]


[COLOR=#11740A][I]// Customize the appearance of table view cells.[/I][/COLOR]
[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR]UITableViewCell [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]tableView[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR]UITableView [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]tableView cellForRowAtIndexPath[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSIndexPath_Class/"][COLOR=#400080]NSIndexPath[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]indexPath [COLOR=#002200]{[/COLOR]
    
    [COLOR=#A61390]static[/COLOR] [URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR]CellIdentifier [COLOR=#002200]=[/COLOR] [COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"Cell"[/COLOR];
    
        
        
    UITableViewCell [COLOR=#002200]*[/COLOR]cell [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR]tableView dequeueReusableCellWithIdentifier[COLOR=#002200]:[/COLOR]CellIdentifier[COLOR=#002200]][/COLOR];
    [COLOR=#A61390]if[/COLOR] [COLOR=#002200]([/COLOR]cell [COLOR=#002200]==[/COLOR] [COLOR=#A61390]nil[/COLOR][COLOR=#002200])[/COLOR] [COLOR=#002200]{[/COLOR]
        cell [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR]UITableViewCell alloc[COLOR=#002200]][/COLOR] initWithStyle[COLOR=#002200]:[/COLOR]UITableViewCellStyleSubtitle reuseIdentifier[COLOR=#002200]:[/COLOR]CellIdentifier[COLOR=#002200]][/COLOR] autorelease[COLOR=#002200]][/COLOR];
    [COLOR=#002200]}[/COLOR]
    [COLOR=#A61390]int[/COLOR] storyIndex [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR]indexPath indexAtPosition[COLOR=#002200]:[/COLOR][COLOR=#002200][[/COLOR]indexPath length[COLOR=#002200]][/COLOR][COLOR=#002200]-[/COLOR]1[COLOR=#002200]][/COLOR];
                
        [URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR]IMG [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR]Images objectAtIndex[COLOR=#002200]:[/COLOR] storyIndex[COLOR=#002200]][/COLOR]objectForKey[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"img"[/COLOR][COLOR=#002200]][/COLOR];
        NSLog[COLOR=#002200]([/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"%@"[/COLOR],IMG[COLOR=#002200])[/COLOR];
        
        [URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] [COLOR=#002200]*[/COLOR]myUrl [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"][COLOR=#400080]NSString[/COLOR][/URL] stringWithFormat[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"http://www.xxx.de/DATA/IMAGES/GALLERY/%@/%@"[/COLOR],selectGal,IMG[COLOR=#002200]][/COLOR];
        
        [URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/"][COLOR=#400080]NSData[/COLOR][/URL] [COLOR=#002200]*[/COLOR]imageData [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/"][COLOR=#400080]NSData[/COLOR][/URL] alloc[COLOR=#002200]][/COLOR]initWithContentsOfURL[COLOR=#002200]:[/COLOR][COLOR=#002200][[/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/"][COLOR=#400080]NSURL[/COLOR][/URL] URLWithString[COLOR=#002200]:[/COLOR]myUrl[COLOR=#002200]][/COLOR][COLOR=#002200]][/COLOR];
        UIImage [COLOR=#002200]*[/COLOR]eImg [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR]UIImage alloc[COLOR=#002200]][/COLOR]initWithData[COLOR=#002200]:[/COLOR]imageData[COLOR=#002200]][/COLOR];
        UIImage [COLOR=#002200]*[/COLOR]c [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR]UIImage imageNamed[COLOR=#002200]:[/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"cell_l"[/COLOR][COLOR=#002200]][/COLOR];
        UIImageView [COLOR=#002200]*[/COLOR]cimg [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR]UIImageView alloc[COLOR=#002200]][/COLOR] initWithImage[COLOR=#002200]:[/COLOR]c[COLOR=#002200]][/COLOR];
        
        cell.backgroundView[COLOR=#002200]=[/COLOR]cimg;
        
        cell.selectionStyle [COLOR=#002200]=[/COLOR] UITableViewCellSelectionStyleNone;
        
        
        
        
        
        
         
        
        cell.imageView.image [COLOR=#002200]=[/COLOR] eImg;
        
        
    [COLOR=#A61390]return[/COLOR] cell;
[COLOR=#002200]}[/COLOR]



[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]tableView[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR]UITableView [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]tableView didSelectRowAtIndexPath[COLOR=#002200]:[/COLOR][COLOR=#002200]([/COLOR][URL="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSIndexPath_Class/"][COLOR=#400080]NSIndexPath[/COLOR][/URL] [COLOR=#002200]*[/COLOR][COLOR=#002200])[/COLOR]indexPath [COLOR=#002200]{[/COLOR]
        
        
                
[COLOR=#002200]}[/COLOR]


[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]didReceiveMemoryWarning [COLOR=#002200]{[/COLOR]
    [COLOR=#11740A][I]// Releases the view if it doesn't have a superview.[/I][/COLOR]
    [COLOR=#002200][[/COLOR]super didReceiveMemoryWarning[COLOR=#002200]][/COLOR];
    
    [COLOR=#11740A][I]// Relinquish ownership any cached data, images, etc that aren't in use.[/I][/COLOR]
[COLOR=#002200]}[/COLOR]

[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]viewDidUnload [COLOR=#002200]{[/COLOR]
    [COLOR=#11740A][I]// Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.[/I][/COLOR]
    [COLOR=#11740A][I]// For example: self.myOutlet = nil;[/I][/COLOR]
[COLOR=#002200]}[/COLOR]


[COLOR=#002200]-[/COLOR] [COLOR=#002200]([/COLOR][COLOR=#A61390]void[/COLOR][COLOR=#002200])[/COLOR]dealloc [COLOR=#002200]{[/COLOR]
        
        [COLOR=#002200][[/COLOR]currentImg release[COLOR=#002200]][/COLOR];
        
    [COLOR=#002200][[/COLOR]super dealloc[COLOR=#002200]][/COLOR];
[COLOR=#002200]}[/COLOR]


[COLOR=#A61390]@end[/COLOR]

und das soll da rein:

Code:
UIScrollView [COLOR=#002200]*[/COLOR]view [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR]UIScrollView alloc[COLOR=#002200]][/COLOR] 
                                                  initWithFrame[COLOR=#002200]:[/COLOR][COLOR=#002200][[/COLOR][COLOR=#002200][[/COLOR]UIScreen mainScreen[COLOR=#002200]][/COLOR] bounds[COLOR=#002200]][/COLOR][COLOR=#002200]][/COLOR];
        NSLog[COLOR=#002200]([/COLOR][COLOR=#BF1D1A]@[/COLOR][COLOR=#BF1D1A]"bilder %@"[/COLOR],[COLOR=#002200][[/COLOR]Images count[COLOR=#002200]][/COLOR][COLOR=#002200])[/COLOR];
        [COLOR=#A61390]int[/COLOR] row [COLOR=#002200]=[/COLOR] [COLOR=#2400D9]0[/COLOR];
        [COLOR=#A61390]int[/COLOR] column [COLOR=#002200]=[/COLOR] [COLOR=#2400D9]0[/COLOR];
        [COLOR=#A61390]for[/COLOR][COLOR=#002200]([/COLOR][COLOR=#A61390]int[/COLOR] i [COLOR=#002200]=[/COLOR] [COLOR=#2400D9]0[/COLOR]; i < Images.count; [COLOR=#002200]++[/COLOR]i[COLOR=#002200])[/COLOR] [COLOR=#002200]{[/COLOR]
                
                UIImage [COLOR=#002200]*[/COLOR]thumb [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR]Images objectAtIndex[COLOR=#002200]:[/COLOR]i[COLOR=#002200]][/COLOR];
                UIButton [COLOR=#002200]*[/COLOR] button [COLOR=#002200]=[/COLOR] [COLOR=#002200][[/COLOR]UIButton buttonWithType[COLOR=#002200]:[/COLOR]UIButtonTypeCustom[COLOR=#002200]][/COLOR];
                button.frame [COLOR=#002200]=[/COLOR] CGRectMake[COLOR=#002200]([/COLOR]column[COLOR=#002200]*[/COLOR]100[COLOR=#002200]+[/COLOR]10, row[COLOR=#002200]*[/COLOR]100[COLOR=#002200]+[/COLOR]10, 98, 70[COLOR=#002200])[/COLOR];
                [COLOR=#002200][[/COLOR]button setImage[COLOR=#002200]:[/COLOR]thumb forState[COLOR=#002200]:[/COLOR]UIControlStateNormal[COLOR=#002200]][/COLOR];
                [COLOR=#002200][[/COLOR]button addTarget[COLOR=#002200]:[/COLOR]self 
                                   action[COLOR=#002200]:[/COLOR][COLOR=#A61390]@selector[/COLOR][COLOR=#002200]([/COLOR]buttonClicked[COLOR=#002200]:[/COLOR][COLOR=#002200])[/COLOR] 
                 forControlEvents[COLOR=#002200]:[/COLOR]UIControlEventTouchUpInside[COLOR=#002200]][/COLOR];
                button.tag [COLOR=#002200]=[/COLOR] i; 
                [COLOR=#002200][[/COLOR]view addSubview[COLOR=#002200]:[/COLOR]button[COLOR=#002200]][/COLOR];
                
                [COLOR=#A61390]if[/COLOR] [COLOR=#002200]([/COLOR]column [COLOR=#002200]==[/COLOR] 2[COLOR=#002200])[/COLOR] [COLOR=#002200]{[/COLOR]
                        column [COLOR=#002200]=[/COLOR] [COLOR=#2400D9]0[/COLOR];
                        row[COLOR=#002200]++[/COLOR];
                [COLOR=#002200]}[/COLOR] [COLOR=#A61390]else[/COLOR] [COLOR=#002200]{[/COLOR]
                        column[COLOR=#002200]++[/COLOR];
                [COLOR=#002200]}[/COLOR]
                
        [COLOR=#002200]}[/COLOR]
        [COLOR=#11740A][I]//self.view.backgroundColor = [[UIColor alloc] initWithPatternImage: [UIImage imageNamed:@"cream_bg02.png"]];   [/I][/COLOR]
        
        [COLOR=#002200][[/COLOR]view setContentSize[COLOR=#002200]:[/COLOR]CGSizeMake[COLOR=#002200]([/COLOR]320, [COLOR=#002200]([/COLOR]row[COLOR=#002200]+[/COLOR]1[COLOR=#002200])[/COLOR] [COLOR=#002200]*[/COLOR] 80 [COLOR=#002200]+[/COLOR] 10[COLOR=#002200])[/COLOR][COLOR=#002200]][/COLOR];       
        self.view [COLOR=#002200]=[/COLOR] view;
        [COLOR=#002200][[/COLOR]view release[COLOR=#002200]][/COLOR]; 

[COLOR=#002200]}[/COLOR]


Das Hauptproblem dabei ist das sobald ich [view addSubview:button]; aktiviere crasht die App. Schreibe ich das ganze mit self davor gehts aber keine Bilder sind da...

Ich steh nun echt aufm Schlauch und hoffe hier kann mir jemand helfen.

Liebe Grüße

Euer Skydiver:-[
 
So Leute nun macht er mir die gewünschte Anzeige im Simulator... Dafür bekomme ich einen Crash auf dem Iphone. So wie es aussieht sind die Bilder zu groß*g* als ob ich es nicht geahnt hätte... Den neuen Code poste ich morgen mal. Vielleicht hilft es jemandem. Denn ne Gallery aus ner geparsten XML generieren mit nem CustomImagePicker ist gar nicht so einfach.
 
Hey, auch wenn du dein Problem gefunden hast. Es ist immer ganz gut die ganze Sache mit nem Debuger durch zugehen ...
 
Genau das hatte ich getan, dieser Meldet nun Signal:0, und die Bilder die er lädt sind bei 34 Bildern 11 MB groß, das scheint zu viel zu sein.

Ach ja hier mein Code wie ich es zum Laufen gebracht hab dass die Gallery in der View auftaucht:

Code:
UIScrollView *GalleryView = [[[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 430)]autorelease];
		
	int row = 0;
	int column = 0;
	for(int i = 0; i < Images.count; ++i) {
		
		NSString *thumb = [[Images objectAtIndex:i ]objectForKey:@"img"];
		NSString *path = [NSString stringWithFormat:@"http://www.cream-theclub.de/DATA/IMAGES/GALLERY/%@",selectGal];
		NSString *thumbUrl = [NSString stringWithFormat:@"%@/%@",path,thumb];
		NSData *imageData = [[[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:thumbUrl]]autorelease];
		UIImage *eImg = [[[UIImage alloc]initWithData:imageData]autorelease];
		NSLog(@"test %@",thumbUrl);
		
		
		UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
		button.frame = CGRectMake(column*100+10, row*100+10, 98,98);
		[button setImage:eImg forState:UIControlStateNormal];
		[button addTarget:self 
				   action:@selector(buttonClicked:) 
		 forControlEvents:UIControlEventTouchUpInside];
		button.tag = i; 
		[GalleryView addSubview:button];
		
		if (column == 2) {
			column = 0;
			row++;
		} else {
			column++;
		}
		
	}
	[GalleryView setContentSize:CGSizeMake(320, (row+1) * 80 + 10)];	
	[self.view addSubview:GalleryView];