Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9145825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:36:36+00:00 2026-06-17T10:36:36+00:00

I am making an app for the iPhone using Xcode and I think that

  • 0

I am making an app for the iPhone using Xcode and I think that Xcode is messing me up…
I have in the ViewController.h:

 @property (weak, nonatomic) IBOutlet UITextField *passwordField;

 @property (weak, nonatomic) IBOutlet UILabel *passwordResult;

 - (IBAction)go:(id)sender;

and in the ViewController.m:

- (void)viewDidLoad {

    A = @"A";

}

- (IBAction)go:(id)sender {

    password = [NSString stringWithFormat:@"%@", _passwordField.text];

    if (password == A) {
         _passwordResult.text = [NSString stringWithFormat:@"%@", A];
         }
   }

This should print the capital letter ‘A’ to my label if the input is a capital ‘A’, right?
If not, How would I do this?

NOTE: I do not want to just copy the inputted phrase and print that, I want to make a password cracker application just to see if it works…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:36:37+00:00Added an answer on June 17, 2026 at 10:36 am

    Instead of:

    if (password == A)
    

    use

    if ([password isEqualToString:A])
    

    Otherwise, you’re only comparing pointers, not the contents of the strings themselves.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making an iPhone app using Xcode and following is the directory structure
I am developping an iPhone App that sends SMS, I am using XCode 4.2
I am making an IPhone app and I have a table view that is
I am making a iPhone app using phone gap in that I want to
I'm making an app for iPhone using obj-c that finds side lengths and angles
I am making an iPhone app using WSDL Web-Services, but I have no idea
I´m making an app on iphone and i have a button that links to
I have an iPhone app that is using my PHP API on the server
I've almost finished my iPhone app and I'm making test using XCode 4 and
I'm using AFJSONRequestOperation in an iPhone app (targeting iOS 5) - basically making a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.