Advertise Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Calcuccino Programmers' Calculator
($2.99)

DataFon(Build Apps on Windows)
(free)

Infinote Pinboard for Todos and Notes
(free)

picplz
(free)

poG
($2.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-21-2008, 06:13 AM   #1 (permalink)
New Member
 
Join Date: Oct 2008
Posts: 41
Default Setting *** for password text field + handle clicked button

Hi guys,
After a lot help from you I have managed to have main functionality of my login screen with desired layout.
Here is my login screen


Now, I only have few minor glitches.

1) I want to make password field show ***** instead of visible characters
2) Because my button is an image it doesn't change when pressed. Any ideas how to make press button visible to end user?

Again, thx a lot.
Mladen
mladjo is offline   Reply With Quote
Old 10-21-2008, 06:20 AM   #2 (permalink)
Registered Member
 
Join Date: Oct 2008
Posts: 56
Default

I'm sorry - I can't answer your question, but I have one of my own if you don't mind.
My question is: do you use a database? In order to load and save exsiting users in your app? if so can you refer me or teach me?
I am a true begginer and I want to learn, can you describe your current app - no source code, only if you want I mean.
~Thank you, sorry for being a bit ignorant.
natanavra is offline   Reply With Quote
Old 10-21-2008, 06:23 AM   #3 (permalink)
New Member
 
Join Date: Oct 2008
Posts: 41
Default

At first I did sqlite3 for my application. Later I realized that is a bit too robust, so I transferred to NSUserDefaults + Data serialization. I found great examples of that right here on this forum, just type in the search field these things, one at the time and you are ready to go
mladjo is offline   Reply With Quote
Old 10-21-2008, 06:41 AM   #4 (permalink)
Registered Member
 
Join Date: Oct 2008
Posts: 56
Default

Thank you my friend! you helped alot.
natanavra is offline   Reply With Quote
Old 10-21-2008, 06:42 AM   #5 (permalink)
New Member
 
Join Date: Apr 2008
Location: Germany
Posts: 154
Default

1) Documentation > "UITextField" > UITextField Class Reference:
Quote:
Conforms to
NSCoding
UITextInputTraits
NSCoding (UIView)
NSObject (NSObject)
"UITextInputTraits" > UITextInputTraits Protocol Reference:
Quote:
secureTextEntry
Identifies whether the text object should hide the text being entered.

@property(nonatomic, getter=isSecureTextEntry) BOOL secureTextEntry
Discussion
This property is set to NO by default. Setting this property to YES creates a password-style text object, which hides the text being entered.

Availability
Available in iPhone OS 2.0 and later.
Related Sample Code
GenericKeychain
UICatalog
Declared In
UITextInputTraits.h
2)
Code:
myImageView.userInteractionEnabled = YES;
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(<#CGFloat x#>, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>)];
[button setImage:[UIImage imageNamed:@"TheImage.png"] forState:UIControlStateNormal];

Last edited by ChriB; 10-21-2008 at 06:50 AM.
ChriB is offline   Reply With Quote
Old 11-03-2008, 03:21 AM   #6 (permalink)
New Member
 
Join Date: Oct 2008
Posts: 41
Post

I still haven't managed to make visible change when button is pressed. Here is my code. What is wrong?

Code:
CGRect contentRect = self.tableView.bounds;
		
		CGFloat boundsX = contentRect.origin.x;
		CGRect frame;
        
		frame = CGRectMake(boundsX + 50, 100, 220, 60);
		UIButton *signInButton = [[UIButton alloc] initWithFrame:frame];
		[signInButton setImage:[UIImage imageNamed:@"button_signin.png"] forState:UIControlStateNormal];
		[signInButton addTarget:self action:@selector(LoginAction) forControlEvents:UIControlEventTouchUpInside];
		
               self.tableView.tableFooterView.userInteractionEnabled = YES;
		self.tableView.tableFooterView = signInButton;
mladjo is offline   Reply With Quote
Old 11-03-2008, 03:28 AM   #7 (permalink)
New Member
 
Join Date: Nov 2008
Posts: 74
Default

To have the text field show asterisks, add this line when you create the text field (or wherever)
yourTextField.secureTextEntry = YES;


Changing the button image is as simple as assigning a different image for the pressed control state.
Code:
[signInButton setImage:[UIImage imageNamed:@"button_signin.png"] forState:UIControlStateNormal];
[signInButton setImage:[UIImage imageNamed:@"yourOtherButtonpng"] forState:UIControlStateHighlighted];
SkylarEC is offline   Reply With Quote
Old 11-13-2008, 07:23 PM   #8 (permalink)
New Member
 
Join Date: Nov 2008
Posts: 1
Default Can you help me

Hi mladjo
Could you please help me in creating that email and password fields and getting their values.
I wrote http post with hardcoded values working great but, not able to do throw user enter login and password

Can you help me in this code.
iamsrihari is offline   Reply With Quote
Old 11-14-2008, 02:31 AM   #9 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 6
Default

Can you tell us in this UIView , what element did you use ? I was trying to using that password login style ,but just can't find the right ui elements.
demowolf is offline   Reply With Quote
Old 02-05-2009, 11:27 AM   #10 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 35
Default Reply *** character in UITextFields

Quote:
Originally Posted by mladjo View Post
Hi guys,
After a lot help from you I have managed to have main functionality of my login screen with desired layout.
Here is my login screen


Now, I only have few minor glitches.

1) I want to make password field show ***** instead of visible characters
2) Because my button is an image it doesn't change when pressed. Any ideas how to make press button visible to end user?

Again, thx a lot.
Mladen
the UITextField has a property "secureText" if you make it true you character change to *******
farshadmb is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Advertisements
» Stats
Members: 51,374
Threads: 52,830
Posts: 225,477
Top Poster: BrianSlick (3,576)
Welcome to our newest member, bob8caldwell
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:27 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0