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 8989573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:17:38+00:00 2026-06-15T22:17:38+00:00

This is my code: NSString * atime = [NSString stringWithFormat:@%@,[theDataObject.minuteArray objectAtIndex:indexPath.row]]; NSLog(@value of atime

  • 0

This is my code:

NSString * atime = [NSString stringWithFormat:@"%@",[theDataObject.minuteArray objectAtIndex:indexPath.row]];

NSLog(@"value of atime is:%@",atime);

if (atime==@"0") {

    NSString * timeStr = [NSString stringWithFormat:@"%@s",[theDataObject.secondArray objectAtIndex:indexPath.row]];

    cell.timeLabel.text = timeStr;
}
else {
    NSString * timeStr = [NSString stringWithFormat:@"%@m%@s",[theDataObject.minuteArray objectAtIndex:indexPath.row],[theDataObject.secondArray objectAtIndex:indexPath.row]];

    cell.timeLabel.text = timeStr;
}

But it never return first statement only return second statement,even is atim value is 0.

log value:

MyAudioRecorder[2484:10703] value of atime is:0 

also tried to put 0 instead of @”0″,still does not work.

  • 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-15T22:17:40+00:00Added an answer on June 15, 2026 at 10:17 pm
    if (atime==@"0")
    

    Compares the memory address of atime with the address of constant string @"0".

    if ([atime isEqualToString:@"0"]) 
    

    Compares the values that are stored in the two memory locations.

    From your requirement it is seen that you want to compare the value not the memory location. So go for 2nd one.

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

Sidebar

Related Questions

I have a this code : NSString *url = [NSString stringWithFormat:@tt://classObj?title=%@, obl.title]; TTTableImageItem *cell
I have this line of code: NSString *dateString = [self.dates objectAtIndex:row]; that gets set
I have this code: NSString *path = [NSString stringWithFormat:@%@/%@, [[NSBundle mainBundle] resourcePath], @change.mp3]; NSURL
I currently have this piece of code: NSString *strURL = [NSString stringWithFormat:@http://www.sample.com /phpFile.php?firstname=%@,txtfirstName.text]; NSString
how to put this code below? - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { NSString *year
When I run this code: - (NSString *)description{ return [NSString stringWithFormat:@(FROG idle:%i animating:%i rect:%@
I have this code: NSString *hString = [NSString stringWithFormat:@%d, (h * 100)]; HField.text =
This code: NSString *imageString = [info objectForKey:UIImagePickerControllerRefrenceURL]; NSLog(@%@, imageString); Returns this: assets-library://asset/asset.JPG?id=1000000002&ext=JPG Is there
I have this code NSString *nextSequentialFile = [filePath stringByReplacingOccurrencesOfString:photoNumber withString:[NSString stringWithFormat:@%d, (index + 1)]
if I run this code: NSString *xml = [[NSString alloc] init]; xml=[NSString stringWithFormat:@<%@>, @msg];

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.