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

The Archive Base Latest Questions

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

I am Working on Recording Application.in This Application i Save my Recording with my

  • 0

I am Working on Recording Application.in This Application i Save my Recording with my own Text and it also Save the Recording with Current Date and Time.As my below Code show

-(IBAction)RecButtonPress:(id)sender
{
    NSLog(@"Song name:%@",mySongname);
    NSMutableDictionary* recordSetting = [[NSMutableDictionary alloc] init];
    [recordSetting setValue :[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey];
    [recordSetting setValue:[NSNumber numberWithFloat:44000.0] forKey:AVSampleRateKey]; 
    [recordSetting setValue:[NSNumber numberWithInt: 1] forKey:AVNumberOfChannelsKey];
    [recordSetting setValue: [NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];
    [recordSetting setValue: [NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey];
    [recordSetting setValue: [NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey];
    NSDate* now = [NSDate date];
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:@"dd:MMM:YY_hh:mm:ss a"];
    NSString *file= [dateFormatter stringFromDate:now];
    NSString *fina=[file stringByAppendingString:mySongname];
    NSArray  *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *docsDir  = [dirPaths objectAtIndex:0];
    NSString *soundFilePath = [docsDir stringByAppendingPathComponent:@"MyRecordings"];
    if (![[NSFileManager defaultManager] fileExistsAtPath:soundFilePath])
        [[NSFileManager defaultManager] createDirectoryAtPath:soundFilePath withIntermediateDirectories:NO attributes:nil error:nil];
            soundFilePath = [soundFilePath stringByAppendingPathComponent:fina];
    recordedTmpFile = [NSURL fileURLWithPath:soundFilePath];
    NSLog(@"Uf:%@",recordedTmpFile);
    recorder = [[ AVAudioRecorder alloc] initWithURL:recordedTmpFile settings:recordSetting error:&error];
    [recorder setDelegate:self];
    [recorder prepareToRecord];
    [recorder record];
        [recordSetting release];
       [dateFormatter release];
}

Now After Saving Recording When i goes to SaveRecording Class Where actually i Show all these Recording in Tableview.here my Code is

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *documentPath = [documentsDirectory stringByAppendingPathComponent:@"MyRecordings"];
directoryContent = [[NSFileManager defaultManager] directoryContentsAtPath:documentPath];
NSLog(@"file found %i",[directoryContent count]);
NSLog(@"arraydata: %@", directoryContent );
[directoryContent retain];
[self.tableView reloadData];
 }

And After That i Assign “directoryContent” Which is my NSMutablArray To UITableview.

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  return [directoryContent count];
}

//////////////////////////////////////////////////////////////////////////////////////////////

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *CellIdentifier = @"Cell";
static NSInteger StateTag = 1;
static NSInteger CapitalTag = 2;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    UILabel *capitalLabel = [[UILabel alloc] initWithFrame:CGRectMake(2, 2, 120, 20)];
    //capitalLabel.text=@"mydata";
    capitalLabel.backgroundColor=[UIColor redColor];
    capitalLabel.tag = CapitalTag;
    [capitalLabel setFont:[UIFont systemFontOfSize:9]];
    [cell.contentView addSubview:capitalLabel];
    [capitalLabel release];

    UILabel *stateLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 22, 310, 20)];
    stateLabel.tag = StateTag;
    [stateLabel setFont:[UIFont systemFontOfSize:14]];
    stateLabel.adjustsFontSizeToFitWidth=YES;
    [cell.contentView addSubview:stateLabel];
    [stateLabel release];

  }
UILabel * stateLabel = (UILabel *) [cell.contentView viewWithTag:StateTag];
//UILabel * capitalLabel = (UILabel *) [cell.contentView viewWithTag:CapitalTag];

stateLabel.text = [directoryContent objectAtIndex:indexPath.row];
//capitalLabel.text = [datesaving objectAtIndex:indexPath.row];

return cell;
}

And Finaly my UITableView is Look like this Below ScreenShot
enter image description here

My All this Brief discussion purpose is that as my Screen shot show That UITableview Cell Show my Text and Current date and Time.Now i want to Split this directoryContent Array data into Two prats.The part which Consist of Current date and time i want to Assign it capitalLabel which is redpart of Cell in UITableview And Text to stateLabel Which is Below part of Cell in UITableview.Any help will be Appriated.Thanks in Advance.

  • 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-15T14:17:58+00:00Added an answer on June 15, 2026 at 2:17 pm

    First you need to append your string like this

    NSString *file3 = [file stringByAppendingString:@"+"];
    
    
    NSString *fina= [file3 stringByAppendingString:mySongname];
    

    after that you need to seperate it like

    NSArray *Array = [str componentsSeparatedByString:@"+"]; 
    NSLog(@"myindex0str:%@",[Array objectAtIndex:0]); 
    NSLog(@"myindex1str:%@",[Array objectAtIndex:1]);
    

    so you will get the both time and songname individually.

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

Sidebar

Related Questions

Im using alot of timers in my application. For recording time, moving object, fading
I am currently working on this application(C#,WPF,LINQ2XML,.NET 4.0) that displays details for 'Animals'. An
I am working on a C# windows application. This application is mainly related to
I'm working on a quick application for my church to assist their recording of
So I have been working on a recording module for a larger application. It's
I am working on an application that has to be tight control of time
I am working in .Net Windows Application. My requirement is, through my code i
I am working on a file sharing web application. This application is being developed
I have a need to add business reporting for an application I am working
I am working on audio recording. I am able to record my audio in

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.