Implement DataSheet in ios

Total Post:70

 1412  View(s)
Rate this:
I want to implement data sheet to display history of user. I want to implement that design like this:
  1. Post:67

    Re: Implement DataSheet in ios

    Add the horizontal line at the specific position and the label at the position and it will look like this.

    Create a tableview and than in cellForRowAtIndexPath method add this code.

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
        NSString *SimpleTableIdentifier;
        UITableViewCell * cell;
        SimpleTableIdentifier = @"SimpleTableIdentifier";
        cell = [tableView  dequeueReusableCellWithIdentifier: nil];
        if(cell == nil) {
            cell = [[UITableViewCell alloc]
            UILabel * numLbl = [[UILabel alloc] initWithFrame:CGRectMake(0,5,33,30)];
            numLbl.text = @"1";
            [numLbl setFont:[UIFont fontWithName:@"Helvetica" size:10.0]];
            numLbl.backgroundColor = [UIColor clearColor];
            [cell addSubview:numLbl];
            UILabel * nameLbl = [[UILabel alloc] initWithFrame:CGRectMake(30,5,50,30)];
            nameLbl.text = @"john%Lakeview";
            [nameLbl setFont:[UIFont fontWithName:@"Helvetica" size:10.0]];
            nameLbl.backgroundColor = [UIColor clearColor];
            [cell addSubview:nameLbl];
            //create a hoizontal separator in cell to display it like column
            UIView* hSeparatorview1 = [[UIView alloc] initWithFrame:CGRectMake(25, 0, 1, 30)];
            hSeparatorview1.backgroundColor = [UIColor blackColor];
            hSeparatorview1.tag = 1;
            [cell addSubview:hSeparatorview1];
            UIView* hSeparatorview2 = [[UIView alloc] initWithFrame:CGRectMake(85, 0, 1, 30)];
            hSeparatorview2.backgroundColor = [UIColor blackColor];
            hSeparatorview2.tag = 2;
            [cell addSubview:hSeparatorview2];
        return cell;
    //this method is used to set the hight of the tableview cell
    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath      *)indexPath;
        return 30;

    I have created it for only two label and two horizontal view but you can create as many as you like.

    And yes dot forget to place this code in didSelectRowAtIndexPath otherwise horizontal view will disappear when user click the cell.

    - (void)tableView:(UITableView *)atableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
        //get the cell which is selected
        UITableViewCell *selectedCell = [atableView cellForRowAtIndexPath:indexPath];
        //set cell horizontal saparator view color of selected cell bcoz when cell selected all view color is gone
        UIView *hSeparatorview1=[selectedCell viewWithTag:1];
        hSeparatorview1.backgroundColor = [UIColor blackColor];
        UIView *hSeparatorview2=[selectedCell viewWithTag:2];
        hSeparatorview2.backgroundColor = [UIColor blackColor];

      Modified On Apr-06-2018 05:41:28 AM
  1. Post:3

    Re: Implement DataSheet in ios

    giants head coach paul anderson points to world cup hangover

    Indeed, our ability to feel pain is surely a critical component of human survival (and there seems similar good reason to think that the pain capacity would be critical for the success of a thinking machine). Nevertheless, I think we can also easily imagine that a person might have such a pain disability without losing their ability to reason, think, write, experience joy, love, appreciate music and so on, having in all other respects a full mental life despite their disability. And in such a case, I think we would say that such a person is still sentient, even if unable to suffer pain.

    After the keeper was able to foil him, Messi chipped the ball towards goal before Tevez, who appeared to be a metre or so offside, flicked home a header beyond two retreating defenders.It momentarily appeared as though the strike was to be ruled out [url=]Nfl jerseys china[/url] as referee Roberto Rosetti consulted his assistant at length, but despite protests from the Mexican players the goal was allowed to stand.Within just seven minutes the Albiceleste rubbed salt into the open wounds by adding a second. Ricardo Osorio took his eye off a simple pass at the back, and the loose ball was pounced upon by Gonzalo Higuain, who charged forward before coolly rounding Perez and slotting into [url=]Wholesale hockey jerseys[/url] the empty net.After their endeavour in the early stages and the injustice of the first goal, Mexico might have considered themselves unfortunate, but they now had to face up to the reality of chasing two goals.It could so easily have been three after Messi throw was flicked on by Higuain and Tevez went on the rampage towards the Mexico goal, but el Tri [url=]Coach handbags outlet[/url] managed to block his effort and then cleared Maxi Rodriguez cross soon after.A further chance was wasted as Argentina really began to turn the screw. Otamendi did superbly to reach the bye line before [url=]Authentic nfl jerseys[/url] crossing for Higuain, who was unable to get enough contact onto his header and glanced wide from five yards.There was a scuffle between the two sets of players as they went in at the break and when they all came back out Mexico did so without Bautista, who was replaced by Pablo Barrera.After an initial period of cat and mouse at the start of the second half the result was put beyond doubt by a moment of Argentine magic.Forced onto his left foot with seemingly nothing on, Carlos Tevez ducked back onto his right, getting a break off a Mexican defender as he did so, before unleashing an unstoppable effort from 25 yards.It was a killer blow for el Tri, a side who [url=]Nfl jerseys wholesale[/url] could quite rightly have claimed to be Argentina equal for long spells in the game.

    13. Roberto Duran, World title fight, New Orleans, 1980: Duran, the fearsome Panamanian boxer, in his welterweight title fight against Sugar Ray Leonard in New Orleans in 1980, did the equivalent of raising a white flag. Confused and exasperated by Leonard's slick movement, Duran suddenly stopped fighting in the eighth and declared, 'No mas, no mas.'">.

    The Mid Atlantic blizzard also helped CBS. After New Orleans, the highest rated market was snowbound Washington, Nielsen said. More people watched the game from their homes in that area instead of going to parties or bars, and Nielsen does a much better job counting viewers in homes than outside of them.