FBProfilePictureView对象不显示图像 [英] FBProfilePictureView object wont show image

查看:158
本文介绍了FBProfilePictureView对象不显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于3.1 iOS SDK,我做了scrumptios facebook开发人员教程。
我设法从Facebook显示我的个人资料名称,但是FBProfilePictureView不会显示图片



保存iboutlet的代码

  @property(强,非原子)IBOutlet FBProfilePictureView * useProfileImage; 

这是我以前用来显示图片的价格

  self.useProfileImage.profileID = user.id; 

我已经确认它通过在标签中显示图像来改变该图像的profileid变量。 / p>

当我第一次运行项目我有这个错误


2012-05 -18 04:04:11.620 Scrumptious [6548:f803]未知类
Interface Builder文件中的FBProfilePictureView


通过在应用程序委托中添加 [FBProfilePictureView class];
到applicationdidfinishlaunching:withoptions来解决它们。



任何想法为什么图片不会显示?



链接到本教程

解决方案

添加作为doFinishLaunching的应用程序委托方法中的第一行, [FBProfilePictureView类]; 对我来说似乎很可笑。



退房SDK中的HelloFacebookSample。这是4行注释:

  //如果您尚未添加-ObjC链接器标志,则可能需要取消注释以下行因为
// Nib文件需要加载类型才能成功连线。
// //stackoverflow.com/questions/1725881/unknown-class-myclass-in-interface-builder-file-error-at-runtime
// [FBProfilePictureView class];

我尝试添加 -ObjC 它工作正常。


im doing the scrumptios facebook developer tutorial for the 3.1 iOS SDK. i've managed to display my profile name from facebook, however the FBProfilePictureView wont show the picture

heres the code for iboutlet

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

here is what i used to display the pic

self.useProfileImage.profileID = user.id;

i have confirmed that the it changed the profileid variable of the image by displaying it in a label.

when i first ran the project i had this error

"2012-05-18 04:04:11.620 Scrumptious[6548:f803] Unknown class FBProfilePictureView in Interface Builder file."

and solved it they way the FB tutorial suggested- by adding [FBProfilePictureView class]; to "applicationdidfinishlaunching: withoptions" in the app delegate.

any idea why the picture wouldnt show?

link to the tutorial

解决方案

Adding the [FBProfilePictureView class]; as the first line in the app delegate method of didFinishLaunching seems kinda hacky to me.

Check out the HelloFacebookSample inside the SDK. Here is the 4 line comment:

// If you have not added the -ObjC linker flag, you may need to uncomment the following line because
// Nib files require the type to have been loaded before they can do the wireup successfully.
// http://stackoverflow.com/questions/1725881/unknown-class-myclass-in-interface-builder-file-error-at-runtime
// [FBProfilePictureView class];

I tried adding the -ObjC flag and it worked fine.

这篇关于FBProfilePictureView对象不显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆