Friday, May 01, 2015

programatic set uitableview row height

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    if([Utils IsUserLoggedIn] && indexPath.section == 0 && indexPath.row == 0)
    {
        
        self.LoginView.frame = CGRectMake(0, 0, self.LoginView.frame.size.width, 800);
        self.LoginButton.frame = CGRectMake(self.LoginButton.frame.origin.x, self.LoginButton.frame.origin.x, self.LoginView.frame.size.width, 34);
        return 800;
    }
    else{
        return UITableViewAutomaticDimension;
    }

}

No comments: