Mahlzeit,
ich baue gerade eine art "Photoalbum".
Hier einmal der Quellcode
Alles anzeigen
Leider wird die Funktion nicht aktiviert![:(](https://osxentwicklerforum.de/wcf/images/smilies/sad.png)
Fehlt noch etwas?
Gruß
Pete
ich baue gerade eine art "Photoalbum".
Hier einmal der Quellcode
Quellcode
- -(void)createimages{
- int y = 20;
- int x = 50;
- UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(testMethod:)];
- [tap setNumberOfTouchesRequired:1];
- [tap setDelegate:self];
- for(int i=0; i< max; ++i) {
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- NSString *documentsDirectory = [paths objectAtIndex:0];
- NSString *getPDFPath = [documentsDirectory stringByAppendingPathComponent:_itemsArray[i]];
- UIImage * myImage = [UIImage imageWithContentsOfFile:getPDFPath];
- if (x < 900) {
- UIImageView *image =[[UIImageView alloc] initWithFrame:CGRectMake(x, y, 125, 100)];
- image.tag = i;
- image = [image initWithImage: myImage];
- image.userInteractionEnabled = YES;
- [image addGestureRecognizer:tap];
- [scroller addSubview:image];
- }else{
- y = y + 150;
- x = 50;
- UIImageView *image =[[UIImageView alloc] initWithFrame:CGRectMake(x, y, 125, 100)];
- image.tag = i;
- image = [image initWithImage: myImage];
- image.userInteractionEnabled = YES;
- [image addGestureRecognizer:tap];
- [scroller addSubview:image];
- }
- x = x + 150;
- }
- }
Leider wird die Funktion nicht aktiviert
![:(](https://osxentwicklerforum.de/wcf/images/smilies/sad.png)
Fehlt noch etwas?
Gruß
Pete
Intelligente Sätze zu verfassen ist gar nicht so einfach. Schon ein einziger Buchstabendreher kann den ganzen Text urinieren... ![:whistling:](https://osxentwicklerforum.de/wcf/images/smilies/whistling.png)
![:whistling:](https://osxentwicklerforum.de/wcf/images/smilies/whistling.png)