2014-01-10 39 views
1

我在FBProfilepicture視圖中獲取圖片。我在該視圖中放置了一個按鈕。當按鈕單擊顯示設備照片並在按鈕中獲取圖像時。但是這個圖像被放置在fbprofile圖片的背面side.please幫助。在我的按鈕 如何隱藏FBProfilepictureview

- (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; 

} 

顯示圖像[自dismissViewControllerAnimated:YES完成:^ {}];

[btn_ProfileFb1Picture setImage:[info objectForKey:UIImagePickerControllerOriginalImage]  forState:UIControlStateNormal]; 
    forControlEvents:UIControlEventTouchUpInside]; 

userProfileImage是一個fbprofilepicture視圖,該視圖包含btn_ProfileFb1Picture。

回答

0

FBProfilepictureview是的UIView的子類,它也支持的UIView的隱藏屬性,因此只是把它隱藏在你點擊鏈接 如果你有這樣的

@property (strong, nonatomic) IBOutlet FBProfilePictureView *useProfileImage; 

然後設置這樣

useProfileImage.hidden = YES; 
對象

或者你可以像

useProfileImage.frame = CGRectZero 
+0

我已更新我的回答 – Retro

+0

它不是working.still FBProfilepictureview在show中。 –

+0

嘗試爲您的對象設置一個新框架 – Retro