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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:37:47+00:00 2026-06-15T06:37:47+00:00

i have been trying for almost a day now , i have a table

  • 0

i have been trying for almost a day now , i have a table view and i call reload data to reload the entries of table. CellForRowAtIndexPath is called only first time but after that other 2 functions number of rows and number of sections are called but not cellforRow. I have checked rows and sections are non – zero and links are Ok… Here is the code. Code is a bit long just follow the reloadData and delegate function of UItableview. thx in advance

@interface HMPeopleController ()

@property(nonatomic, retain)  UIPopoverController *popOverHMPeople;

@end

@implementation HMPeopleController
@synthesize peopleCell,hmpeopleController,storedArrayForContacts;
@synthesize btnPeople;
@synthesize addingContactToPeopleList;
@synthesize popOverHMPeople,popOverEmail;
@synthesize attendees, btnIsHidden;
@synthesize peopleTableView,attendeeToBeAdded, meetingSummary, atendeeList, sortedArray,btnAddEmail,attendeeCount;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    appdelegate = (AppDelegate*)[[UIApplication sharedApplication]delegate];

    if (self) {
        // Custom initialization
    }
    return self;
}
- (void)dealloc
{

    [hmpeopleController release];
    [popOverEmail release];
    [self.peopleTableView release];
    [addingContactToPeopleList release];

    [attendees release];

    [attendeeCount release];
    [sortedArray release];
    [self setAttendeeToBeAdded:nil];
    [super dealloc];
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
          AppDelegate *    appDelegate = (AppDelegate*)[[UIApplication sharedApplication]delegate];
    if (appDelegate.joinOnlyMode) {
        btnAddEmail.hidden=YES;
    }

    content = [AttendeesHeaderGenerator wordsFromLetters];
    indices = [[content valueForKey:@"headerTitle"] retain];
    self.sortedArray = [[NSMutableArray alloc]init];
    [[NSNotificationCenter defaultCenter] removeObserver:self];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadData:) name:@"reload-data" object:nil];


       int totalOnline=0;

    for (HMAttendee *ha in [HMMainManager getSharedInstance].currentMeeting.arrMeetingUsers) {
        if (ha.userStatus) {
            totalOnline++;
        }
    }

    attendeeCount = [[UILabel alloc]initWithFrame:CGRectMake(125, 5, 22, 21)];    
    attendeeCount.text=[[NSString alloc]initWithFormat:@"%i",totalOnline];
    [ attendeeCount setTextColor:[UIColor whiteColor] ];
    [attendeeCount setBackgroundColor:[UIColor clearColor]];

    [self.navigationController.view addSubview:attendeeCount];

    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(doneFromHmpeople:) name:@"doneFromHmpeople" object:nil];
    AppDelegate* app = (AppDelegate*)[[UIApplication sharedApplication] delegate];

    if(!app.joinOnlyMode)
    {
        UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"Contacts" style:UIBarButtonItemStyleDone target:self action:@selector(addContactBtnPressed:)];
        self.navigationItem.rightBarButtonItem = rightButton;

        [rightButton release];

        UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithTitle:@"Email" style:UIBarButtonItemStyleDone target:self action:@selector(addEmailHandler:)];
        self.navigationItem.leftBarButtonItem = leftButton;
        [leftButton release];
    }
    UILabel *lb=[[UILabel alloc]initWithFrame:CGRectMake(150,5,55, 21)];

    [lb setText:@"Online"];
    [lb setBackgroundColor:[UIColor clearColor]];
    [lb setTextColor:[UIColor whiteColor]];
    [self.navigationController.view addSubview:lb];
    [lb release];

    UIImageView *onlineIcon=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"button-onn.png"] ];
    onlineIcon.frame=CGRectMake(98, 0, 32, 32);
    [self.navigationController.view addSubview:onlineIcon]; 




    [self.view setBackgroundColor:[UIColor clearColor]];
    //  self.title=@"Addtendees";
}

-(IBAction)DonePressed:(id)sender{

    [[NSNotificationCenter defaultCenter] postNotificationName:@"hideatendeelist" object:nil];
}


-(void) reloadData:(id) sender
{

    if (self.view.tag == 555) {
        int users  = [[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsers count];
        numberOfRecords = users == 0 ? 1:users;
    }
    else
    {
        int users  = [[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsers count];
        if (users == numberOfRecords || (users-numberOfRecords) < 0) {
            [btnPeople setTitle:[NSString stringWithFormat:@"%@",NSLocalizedString(@"People", nil)] forState:UIControlStateNormal];
        }
        else
        {
            //relalocate resources.

            [btnPeople setTitle:[NSString stringWithFormat:@"%@(%d)",NSLocalizedString(@"People",nil),users-numberOfRecords] forState:UIControlStateNormal];
        }
    }
            int totalOnline=0;
    for (HMAttendee *ha in [HMMainManager getSharedInstance].currentMeeting.arrMeetingUsers) {
        if (ha.userStatus) {
            totalOnline++;
        }
    }

    attendeeCount.text=[[NSString alloc]initWithFormat:@"%i",totalOnline];
    [sortedArray removeAllObjects];
    NSLog(@"%i",[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsersForTb.count);
    int total=[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsersForTb.count;

    for (int i=0; i<total; i++) {
        //        HMAttendee *at = [[HMAttendee alloc] init];
        HMAttendee *at = [[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsersForTb objectAtIndex:i ];
        [sortedArray addObject:at];
    }

    [self.peopleTableView reloadData];
}
- (void)viewDidUnload
{


    attendeeCount = nil;
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];

    [[NSNotificationCenter defaultCenter] removeObserver:self];

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(contactsSelected:)
                                                 name:@"contactsSelected"
                                               object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(hideAttendePopOver)
                                                 name:@"hideatendeePopOver"
                                               object:nil];
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
}

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];

    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (void)viewDidDisappear:(BOOL)animated
{
    [super viewDidDisappear:animated];

}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    // Return the number of sections.
    if ([[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsersForTb count] > 0) {
        NSArray *attendeeSecArray = [NSArray arrayWithArray:[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsersForTb];
        self.sortedArray = [NSMutableArray arrayWithArray:[attendeeSecArray sectionedArrayUsingProperty:@"strName"]];
        return [sortedArray count];  
    }else {
        return 0;
    }
    return 0;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    // Return the number of rows in the section.

    //    int count = [[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsers count];
    //    int rowsInSec = 0;
    //    for (int i=0; i<count; i++) {
    //        HMAttendee* attdee = [[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsers objectAtIndex:i];    
    //        if ([[[content objectAtIndex:i] objectForKey:@"headerTitle"] isEqualToString:[attdee.strName substringToIndex:1]]){
    //            rowsInSec++;
    //            NSLog(@"Number of rows in section are %d", rowsInSec);
    //            
    //        }
    //    }

    NSArray *sectionArray = [sortedArray objectAtIndex:section];
    return [sectionArray count];


    // return count == 0?1:count;
    //return rowsInSec;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
        static NSString *CellIdentifier = @"Cell";
    int count = [[sortedArray objectAtIndex:indexPath.section] count];



    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
                                       reuseIdentifier:CellIdentifier] autorelease];
    }
    if (indexPath.row == 0) {
        cell.textLabel.text = NSLocalizedString(@"[Presenter]", nil);
    }


    if (count == 0) {
        cell.textLabel.text = [HMMainManager getSharedInstance].currentUser.strName;
    }
    else 
    { 

        HMAttendee* attdee = [[sortedArray objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];
        cell.textLabel.text = attdee.strName;
        if(attdee.userStatus)
        {

            UIImageView *img=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"1.png"]];
            img.frame=CGRectMake(280, (cell.frame.size.height/2)/2, 16,16);

            [cell addSubview:img];
            [img release];
            //       cell.imageView.image=[UIImage imageNamed:@"1.png"];
            //      cell.imageView.frame=CGRectMake(280, cell.imageView.frame.origin.y, cell.imageView.image.size.width, cell.imageView.image.size.height);

        }
        else
        {

            UIImageView *img=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"0.png"]];
            img.frame=CGRectMake(280,(cell.frame.size.height/2)/2, 16,16);

            [cell addSubview:img];
            [img release];
            //         cell.imageView.frame=CGRectMake(280, cell.imageView.frame.origin.y, cell.imageView.image.size.width, cell.imageView.image.size.height);
        }
    }
    return cell;
}




#pragma mark - Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    // Navigation logic may go here. Create and push another view controller.
    /*
     <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil];
     // ...
     // Pass the selected object to the new view controller.
     [self.navigationController pushViewController:detailViewController animated:YES];
     [detailViewController release];
     */
}

-(IBAction)addContactBtnPressed:(id)sender{


    if ([self.popOverHMPeople isPopoverVisible]) {

        [self.popOverHMPeople dismissPopoverAnimated:YES];

    } 
    else
    {

        AddPeopleViewController *addPeopleController = nil;
        addPeopleController =[[AddPeopleViewController alloc] initWithNibName:@"AddPeopleViewController" bundle:nil];
        addPeopleController.delegate=self;


        myContactsViewController *addressbookController=[[myContactsViewController alloc]initWithNibName:@"myContactsViewController" bundle:nil];
        UINavigationController *nav = [[UINavigationController alloc]
                                       initWithRootViewController:addressbookController];

        [self setPopOverHMPeople:[[[UIPopoverController alloc] initWithContentViewController:nav]autorelease]];

        self.popOverHMPeople.popoverContentSize = CGSizeMake( 300,500);

        //    if ([self.popOverHMPeople isPopoverVisible]) {
        //        
        //        [self.popOverHMPeople dismissPopoverAnimated:YES];
        //        
        //    } 
        //    else
        //    {

        CGRect bound;
        //bound=showAddressBookBtn.bounds;
        // bound.origin.x = 720;
        // bound.origin.y = 25;
        [self.popOverHMPeople presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
        //            }


    }
}


-(void) refresh
{
    [btnPeople setTitle:NSLocalizedString(@"People" , nil)forState:UIControlStateNormal];
    int count = [[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsers count];
    numberOfRecords =  ( count== 0) ? 1:count;

    //add new added attendee


    for (HMAttendee* attendee in attendeeToBeAdded){

        NSMutableArray *storeArray =  [[HMMainManager getSharedInstance].currentMeeting arrMeetingUsers];
        BOOL found=NO;
        for (HMAttendee *storeAtted in storeArray) {

            if ([attendee.strName isEqualToString:storeAtted.strName]) {
                found=YES;
            }
        }

        if(!found)
            [[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsers addObject:attendee];
    }

    [peopleTableView reloadData];

}

-(void) customDataInitialization
{
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadData:) name:@"reload-data" object:nil];
    numberOfRecords = 1;

}


- (void)ContactsSelected:(NSMutableArray *)contacts {

    NSLog(@"%d@",[[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsers count]);
    [[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsers addObjectsFromArray:attendees];
    NSLog(@"%d@",[[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsers count]);

    [peopleTableView reloadData];    



}

- (void)doneFromHmpeople:(NSNotification *)notification{

    if(popOverEmail.popoverVisible )
        [popOverEmail dismissPopoverAnimated:YES];


    //    [self refresh];


}

- (IBAction)addEmailHandler:(UIBarButtonItem *)sender{


    if ([popOverEmail isPopoverVisible]) {
        [popOverEmail dismissPopoverAnimated:YES];
    }
    else {

        hmpeopleController = [[HMPeopleControllerAddEmail alloc]initWithNibName:@"HMPeopleControllerAddEmail" bundle:nil];
        UINavigationController  *     navEmail=[[UINavigationController alloc]initWithRootViewController:hmpeopleController];
        popOverEmail=[[UIPopoverController alloc]initWithContentViewController:navEmail];

        [popOverEmail setPopoverContentSize:CGSizeMake(hmpeopleController.view.frame.size.width, hmpeopleController.view.frame.size.height)];

        [popOverEmail presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];

    }


}

- (BOOL)emailChecker:(NSString *)testStr{

    NSError *error=nil;
    NSRegularExpression *regex = [[NSRegularExpression alloc]initWithPattern:@"[a-zA-Z_.0-9]+(@){1}[a-zA-Z0-9]+(\\.){1}[a-zA-Z]{2,4}" options:NSRegularExpressionDotMatchesLineSeparators error:&error];    
    //      NSRegularExpression *regex = [[NSRegularExpression alloc]initWithPattern:@"[a-zA-Z]+" options:NSRegularExpressionDotMatchesLineSeparators error:&error];


    int matche=[regex numberOfMatchesInString:testStr options:0 range:NSMakeRange(0,testStr.length)];

    NSArray* matches = [regex matchesInString:testStr options:0 range:NSMakeRange(0, [testStr length])];

    if (matche<=0) {
        return NO;
    }


    for ( NSTextCheckingResult* match in matches )
    {
        NSString* matchText = [testStr substringWithRange:[match range]];
        if(![matchText isEqualToString:testStr])
        {
            NSLog(@"%@ =In valid",matchText);
            return NO;
        }
        else if([matchText isEqualToString:testStr])  {
            NSLog(@"%@",matchText);
            return YES;
        }

    }


    return nil;

}

- (void)contactsSelected:(NSNotification *)notification
{
    attendees =[[NSMutableArray alloc]init];
    //    [self dismissModalViewControllerAnimated:YES];
    NSDictionary *dict = [notification userInfo];
    storedArrayForContacts=[dict objectForKey:@"key"];



    NSMutableString *attendeesCanntBeAdded=[[NSMutableString alloc]init]; 

    int count=[[dict objectForKey:@"key"] count];
    if (count==0) {
        [self.popOverHMPeople dismissPopoverAnimated:YES];
        return;
    }
    NSMutableString* xmlDataString = [[NSMutableString alloc] init];

    [self setAttendeeToBeAdded:nil];

    attendeeToBeAdded = [[NSMutableArray alloc]init];
    for (int i=0; i<count; i++) {

        HMAttendee *atn= [[HMAttendee alloc]init];

        atn.strName= [[[dict objectForKey:@"key"] objectAtIndex:i] objectForKey:@"Email"];


        if (![self emailChecker:atn.strName]) {
            [attendeesCanntBeAdded appendFormat:@"%@ ",atn.strName];
            continue;
        }



        if([atn.strName length] > 0)
        {

            if ([attendeeToBeAdded count] == 0) {
                NSMutableString* attendeeEmails = [[NSMutableString alloc] init];
                [attendeeEmails appendString:@"<EmailID>"];
                [attendeeEmails appendString:atn.strName];
                [attendeeEmails appendString:@"</EmailID>"];

                // [attendeeEmails appendString:atn.strName];
                NSString *data = [NSString stringWithFormat:ADD_ATTENDEES_LIST_FORMAT,attendeeEmails];
                [xmlDataString appendString:data];
                // [attendeeEmails appendFormat:@"%@</EmailID><EmailID>",atn.strName];
                [attendeeEmails release];
            }else{
                NSMutableString* attendeeEmails = [[NSMutableString alloc] init];
                [attendeeEmails appendString:@"<EmailID>"];
                [attendeeEmails appendString:atn.strName];
                [attendeeEmails appendString:@"</EmailID>"];

                NSString *email = [NSString stringWithFormat:ADD_ATTENDEES_LIST_FORMAT,attendeeEmails];

                [xmlDataString appendString:(NSMutableString*)email];
            }
            [attendeeToBeAdded addObject:atn];
        }
        [atn release];
    }   
    //[attendeeEmails appendString:@"</EmailID>"];
    if (attendeesCanntBeAdded.length>0) {
        NSString *st=[[NSString alloc]initWithFormat:@"Following Emails are invalid:%@",attendeesCanntBeAdded];
        UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Skribbee" message:st delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
        [popOverEmail dismissPopoverAnimated:YES];
        [alert show];
        [alert release];
        [attendeesCanntBeAdded release];
        [st release];

    }


    if ([HMMainManager getSharedInstance].currentMeeting.isAttendeePopOver == true && [attendeeToBeAdded count] > 0) {

        // NSString* aList = [NSString stringWithFormat:ADD_ATTENDEES_LIST_FORMAT,attendeeEmails];
        [[HMMainManager getSharedInstance].currentMeeting addAttendee:@"" list:xmlDataString andDelegate:self];

    }

}
- (void)requestFinished:(ASIHTTPRequest *)request
{
    [self.popOverHMPeople dismissPopoverAnimated:YES];

    if(request.tag == ADD_ATTENDEE_REQUEST) {
        NSLog(@"%d",request.responseStatusCode);
        NSLog(@"%@",request.responseStatusMessage);
        NSLog(@"%@",[request responseString]);

        [[NSNotificationCenter defaultCenter] postNotificationName:@"disableButton" object:nil];

        [(AppDelegate *)[[UIApplication sharedApplication]delegate] hideActivityView];

        if(request.responseStatusCode == 200)
            //            [self hideAttendePopOver];
        {


            NSDictionary *dic=[request.responseString JSONValue ];
            NSString *rejectedEmails=[dic objectForKey:@"Description"];
            int startPtr,endPtr,offset;
            NSString *subStr;
            if(![rejectedEmails isEqualToString:@"OK"])
            {

                for (int i=0; i<rejectedEmails.length; i++) {
                    unichar c=[rejectedEmails characterAtIndex:i];
                    NSString *tmpStr=[[NSString alloc]initWithCharacters:&c length:1];

                    if([tmpStr isEqualToString:@"("])
                    {
                        startPtr=i;
                        startPtr++;
                    }
                    if([tmpStr isEqualToString:@")"])
                    {
                        endPtr=i;
                        offset=endPtr-startPtr;
                        subStr=[rejectedEmails substringWithRange:NSMakeRange(startPtr, offset)];
                        break;
                    }



                }//end for
                startPtr=0,endPtr=0,offset=0;
                NSMutableArray *tempMarray=[[NSMutableArray alloc]init];
                //            NSData *data=[subStr dataUsingEncoding:NSWindowsCP1251StringEncoding];
                //            NSString *textRev=[[NSString alloc]initWithData:data encoding:NSWindowsCP1251StringEncoding];
                //            
                //            NSLog(@" Actual String.. %@",textRev);
                //            subStr=textRev;
                for (int i=0;i<subStr.length; i++) {
                    unichar c=[subStr characterAtIndex:i];
                    NSString *tmpStr=[[NSString alloc]initWithCharacters:&c length:1];
                    if(i == (subStr.length-1) )
                    {



                        int offset=i-startPtr+1;
                        NSString *subStr2=[subStr substringWithRange:NSMakeRange(startPtr, offset)];

                        if([subStr2 isEqualToString:@" "])
                            break;

                        NSMutableDictionary *tempDict=[[NSMutableDictionary alloc]init];

                        [tempDict setObject:@"" forKey:@"Name"];
                        [tempDict setObject:subStr2 forKey:@"Email"];
                        [tempMarray addObject:tempDict];
                        startPtr=i+1;

                    }

                    if([tmpStr isEqualToString:@","])
                    {
                        int offset=i-startPtr;
                        NSString *subStr2=[subStr substringWithRange:NSMakeRange(startPtr, offset)];
                        NSMutableDictionary *tempDict=[[NSMutableDictionary alloc]init];

                        [tempDict setObject:@"" forKey:@"Name"];
                        [tempDict setObject:subStr2 forKey:@"Email"];
                        [tempMarray addObject:tempDict];
                        startPtr=i+1;
                    }
                }
                NSMutableArray *tempArr=[[NSMutableArray alloc]initWithArray:attendeeToBeAdded];

                for (NSDictionary *d2 in tempMarray) {
                    NSString *drstr=[d2 objectForKey:@"Email"];
                    drstr=[drstr stringByReplacingOccurrencesOfString:@" " withString:@""];
                    for (HMAttendee *d3 in tempArr) {
                        NSString *d3str=[d3.strName stringByReplacingOccurrencesOfString:@" " withString:@""];
                        if([d3str isEqualToString:drstr])
                        {
                            [attendeeToBeAdded removeObject:d3];

                        }
                    }
                }

            }//end OK if
            NSString *code=[dic objectForKey:@"Code"];

            NSLog(@"%@",[request responseString]);
            [self refresh];

            if([code isEqualToString:@"200.1"])
            {
                //                UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Skribbee" message:[dic objectForKey:@"Description"] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
                //                [alert show];
                //                [alert release];



            }
            else if([code isEqualToString:@"200"])
            {
                //            UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Skribbee" message:@"Attendee Added Successfully!." delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
                //            [alert show];
                //            [alert release];
            }
        }
        else {

            UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Skribbee" message:@"Your request was not completed successfully, please try again later!." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
            [alert show];
            [alert release];
        }

    }
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
    [[NSNotificationCenter defaultCenter] postNotificationName:@"hideatendeelist" object:nil];
}

-(void)hideAttendePopOver{

    [self.popOverHMPeople dismissPopoverAnimated:YES];
}

@end
  • 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-15T06:37:48+00:00Added an answer on June 15, 2026 at 6:37 am

    In your numberOfSectionsInTableView you are returning 0. That’s why it’s not working.

    Also the possible issue is if the [sortedArray count] is zero then also the numberOfSection will return 0. Hence the cellForRowAtIndexPath won’t be called. Check the count of the array using NSLog.

    NSlog(@"Array count %d", [sortedArray count]);
    

    Change the method like:

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    {
        // Return the number of sections.
        if ([[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsersForTb count] > 0)
        {
            NSArray *attendeeSecArray = [NSArray arrayWithArray:[HMMainManager getSharedInstance].currentMeeting.arrMeetingUsersForTb];
            self.sortedArray = [NSMutableArray arrayWithArray:[attendeeSecArray sectionedArrayUsingProperty:@"strName"]];
            return [sortedArray count];  
        }
        else
        {
            return 1;
        }
        return 1;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying for almost a week now to create an SQLite database
I have been trying in vain for almost two weeks now to generate a
well I have been trying to get Nivo Slider to work almost all day.
For almost three days now I have been trying to get the boost libs
I've been trying to use buildExpressionParser to parse a language, and I almost have
I have been racking my brain and searching google for almost the whole day
I have been trying to play with SublimeText2 for some time now. While it
I have been trying to find encoding for below json strings from a day.
I have implemented a UISearchBar into a table view and almost everything is working
I've been trying to fix this problem almost all day (or it feels like

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.