Hi all,
I'm facing a new problem with adding my buttons.
Now I'm adding buttons to the bottom bar. They show up, with the image, but...
the action is never being called.
This is proberbly a simple fault so hopefully someone can help me out here
I'm really struggling for a few hours now
I'm facing a new problem with adding my buttons.
Now I'm adding buttons to the bottom bar. They show up, with the image, but...
the action is never being called.
This is proberbly a simple fault so hopefully someone can help me out here
Code:
for(int a=0;........
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *path = [documentsDirectory stringByAppendingPathComponent:
[NSString stringWithFormat: @"%@/favorites/%@", theSub, [currentFavoriteImgs objectAtIndex: a]]];
UIImage *favoImage = [UIImage imageWithContentsOfFile: path];
UIButton *favoButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[favoButton setTag: a];
[favoButton setTitle: @"" forState:UIControlStateNormal];
favoButton.frame = CGRectMake(x, y, size, size);
[favoButton setBackgroundColor: [UIColor clearColor]];
[favoButton setBackgroundImage: favoImage forState:UIControlStateNormal];
[favoButton setBackgroundImage: favoImage forState:UIControlStateHighlighted];
[favoButton addTarget:self action:@selector(chosenBtnAction:) forControlEvents: UIControlEventTouchUpInside];
[bottombar addSubview:favoButton];
I'm really struggling for a few hours now