简体   繁体   English

parse.com使当前用户进入文本字段

[英]parse.com getting current user in to textfields

I have my current user output to NSLog as follows 我将当前用户输出到NSLog ,如下所示

adress1 = "result"
address2 = "result"
address3 = "result"
postcode = "result"
displayname = "result"
email = "result"
mobile = "result"

Now I have those details. 现在我有那些细节。 How do I get them to appear in my view controller using textfield as I want the user to be able to change and edit the details if needed 我如何使它们出现在使用textfield视图控制器中,因为我希望用户能够根据需要更改和编辑详细信息

my .h file 我的.h文件

@interface UserEditViewController : UIViewController

@property (weak, nonatomic) IBOutlet UITextField *UserNameText;
@property (weak, nonatomic) IBOutlet UITextField *EmailAddressText;
@property (weak, nonatomic) IBOutlet UITextField *MobileText;
@property (weak, nonatomic) IBOutlet UITextField *Address1Text;
@property (weak, nonatomic) IBOutlet UITextField *Address2Text;
@property (weak, nonatomic) IBOutlet UITextField *PostCodeText;
@property (weak, nonatomic) IBOutlet UITextField *TaxiOrCust;


- (IBAction)SaveBtn:(id)sender;

I have tried 我努力了

UserNameText = displayname 

but can't seem to bring up the display name 但似乎无法显示显示名称

I have posted in parse and to tell the truth there forums are rubbish as no one replays for days. 我在分析中发布了一个帖子,说实话那里的论坛很垃圾,因为没有人重放几天。

Please refer the comments below :- 请参考以下评论:

1)Well first thing you need to check. 1)首先您需要检查。 Whether you have connected proper bindings with your textfield . 是否已将适当的bindingstextfield连接。

2) Second thing, if bindings are proper then check inside Interface Builder -> Attribute inspector->View->interaction should be enabled 2)第二件事,如果绑定正确,则在Interface Builder中检查-> Attribute inspector->View->interaction should be enabled器-> Attribute inspector->View->interaction should be enabled

3)Now for setting the textvalue inside textfield @A Bao has mentioned follow that. 3)现在在文本框内设置文本值@A Bao提到了这一点。 Though, you have taken the property of textfield . 但是,您已经采用了textfield的属性。 So modify the code like that using self self.UserNameText.Text = displayname; 因此,使用self self.UserNameText.Text = displayname;修改代码self.UserNameText.Text = displayname; and also make sure displayname should not contain nil value. 并确保displayname不应包含nil值。

NSString *displayName = [currentUser objectForKey:@"displayName"];

self.UserNameText.Text = displayName;

作为-

 UserNameText.Text = displayname;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM