I have an application that gives wallpapers , but they are given on the whole view. I put buttons in the interface with actions and when i debug the app. I don’t see the buttons, I only see the wallpapers … But the buttons are working when I press on them while I don’t see them on the simulator. Any idea why ? I’d like to ask how I have to make the pictures coming in a UIImageView wich is now not in the app. So I’d like to make a app with wallpapers given in a UIIamgeView with a toolbar down for buttons. And the wallpaper has to be the good size because the user can choose to save the wallpaper in his photos. ANy idea how to do ?
Currently code using for whole view :
-(void)awakeFromNib {
self.n = 1;
UIImage* wallpaper = [UIImage imageNamed:@"wp_1.png"];
UIImageView* view = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,420)];
self.wallpaper = view;
view.image=wallpaper;
[self.view addSubview:view];
}
You only see the wallpaper because
addSubview:inserts the new view on top of all other views. You could use[self.view insertSubview:view atIndex:0]to insert it at the bottom, or you could use[self.view sendSubviewToBack:view]after adding it to send it to the back.