我在FBProfilepicture视图中获取图片。我在此视图中放置了一个按钮。当按钮单击显示设备照片并按下按钮时获取图像。但这张图片放在fbprofile图片视图后面。请帮忙。
- (IBAction)act_AddPhotoFacebLogin:(id)sender {
mPicker = [[UIImagePickerController alloc] init];
mPicker.delegate = self;
mPicker.allowsEditing = YES;
mPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:mPicker animated:YES completion:NULL];
userProfileImage.frame = CGRectZero;
}
在我的按钮中显示图像 [self dismissViewControllerAnimated:YES completion:^ {}];
[btn_ProfileFb1Picture setImage:[info objectForKey:UIImagePickerControllerOriginalImage] forState:UIControlStateNormal];
forControlEvents:UIControlEventTouchUpInside];
userProfileImage是一个fbprofilepicture视图,该视图包含btn_ProfileFb1Picture。
答案 0 :(得分:0)
FBProfilepictureview是UIView的subClass,它也支持UIView的hide属性,所以只需将它隐藏在你点击的按钮上 如果你有像这样的对象
@property (strong, nonatomic) IBOutlet FBProfilePictureView *useProfileImage;
然后像这样设置
useProfileImage.hidden = YES;
或者你可以这样做
useProfileImage.frame = CGRectZero