【发布时间】:2014-09-04 14:00:31
【问题描述】:
PFImageView 及其.file 属性及其对应的-loadInBackground 方法非常有用。我无法弄清楚如何“走另一条路”,即从新图像中获取 PFFile 参考:
RA_MyAccount.h(摘录)
@property (weak, nonatomic) IBOutlet PFImageView *profilePic;
-(IBAction)saveButtonTapped:(id)sender;
RA_MyAccount.m(摘录)
-(void)setLocalImageToPFImageView:(UIImage *)localImage
{
self.profilePic.image = localImage
}
-(IBAction)saveButtonTapped:(id)sender
{
PFUser *cUser = [PFUser currentUser];
// Get the PFFile reference for the new image
PFFile *file;
file = ??? ??? ??? ???
// Set
cUser[PF_USER_PIC] = file;
[cUser saveInBackgroundWithBlock:
^(BOOL succeeded, NSError *error){
[self performSegueWithIdentifier:@"unwindtotabviewsegue" sender:self];
}];
}
我已经用??? ??? ??? ??? 指出了我遇到问题的地方。
【问题讨论】:
标签: parse-platform pffile