[英]how to hide FBProfilepictureview
我在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完成:^ {}];
[btn_ProfileFb1Picture setImage:[info objectForKey:UIImagePickerControllerOriginalImage] forState:UIControlStateNormal];
forControlEvents:UIControlEventTouchUpInside];
userProfileImage是fbprofilepicture视图,此视图包含btn_ProfileFb1Picture。
FBProfilepictureview是UIView的子类,它还支持UIView的hide属性,因此如果您有这样的对象,只需将其设置为隐藏在按钮单击上即可
@property (strong, nonatomic) IBOutlet FBProfilePictureView *useProfileImage;
然后像这样设置
useProfileImage.hidden = YES;
或者你可以喜欢
useProfileImage.frame = CGRectZero
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.