我在米文件添加的按鈕和圖像,一些如何按鈕回圖像和沒有出現,我需要圖像應回和按鈕應前和應該是點擊的工作,下面的代碼:的UIButton的UIImage需要設置層順序z順序和z索引
UIImage *myImage=[UIImage imageNamed:@"bottom_bar.png"];
UIImageView *imageView =[[UIImageView alloc] initWithImage:myImage];
imageView.frame= CGRectMake(0, 0, 320, 32);
[footerView addSubview:imageView];
UIButton *profileButton = [UIButton buttonWithType:UIButtonTypeCustom];
CGRect profileRect = CGRectMake(215.0, 0,20, 20);
[profileButton setFrame:profileRect];
[profileButton addTarget:self action:@selector(profile:) forControlEvents:UIControlEventTouchUpInside];
UIImage *profileImage = [UIImage imageNamed:@"profile_icon.png"];
[profileButton setImage:profileImage forState:UIControlStateNormal];
[footerView addSubview:profileButton];