i am doing a project ,where i have to show a view like this i tried to use table view ,but i was unable to implement ,after that i have decided to implement this with the help of collection view.but nothing fruitful happened .i get frustated here because nothing can happen with my view .these are the text fields added on the view and all are clickable,can anyone help me in this i am a fresher so please help me.
Asked
Active
Viewed 706 times
0
-
I think this can be done with the help of Grouped tableView. Check the documentation http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/tableview_iphone/tableviewstyles/tableviewcharacteristics.html – iCoder Jun 18 '13 at 12:47
-
This can be done using tableview, customizing its cell. – Justin Mathews Jun 18 '13 at 12:53
-
@Norbert i tried it with the help of table view but was unable to implement .Please suggest me some other way – Priyanka Jun 18 '13 at 12:53
-
@steve Jobs i tried that also tell me how to add different textfields & those should be responsive – Priyanka Jun 18 '13 at 12:55
-
You can have a custom cell in the tableview. basically u need to add 8 textfields in each cell as per your requirement, assuming all the fields are editable. you can check http://www.appcoda.com/customize-table-view-cells-for-uitableview/ for creating custom cell. This is just an example. you can create your own as per the requirement. – iCoder Jun 18 '13 at 13:07
-
thankew norbert actually i have gone through that but thank you for the help – Priyanka Jun 18 '13 at 13:30
1 Answers
0
//////////////////
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
if(section==0)
{
return self.view_header;
}
return nil;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
CGFloat height =0.00;
if(section==0)
{
height = 32;
}
return height;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.section == 1)
{
return 51;
}
else
{
return 35;
}
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
if(self.flag_loadCompleted == TRUE)
{
return 1;
}
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if(section == 0)
{
return [self.arr_data count];
}
else if(section == 1)
{
return 1;
}
return 0;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"MyTemplate";
MyFinancialTemplate *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == nil)
{
cell = [MyFinancialTemplate createNewTextCellFromNib];
}
cell.index = indexPath.row;
if(indexPath.section == 0)
{
cell.index = indexPath.row;
cell.flag_loader = FALSE;
cell.selectionStyle = UITableViewCellSelectionStyleGray;
}
else
{
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.flag_loader = TRUE;
}
[cell LoadCell];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
}

Justin Mathews
- 512
- 4
- 18
-
ok i will try this.thank you for the help,and please tell me how to get response from each textfield. – Priyanka Jun 18 '13 at 13:31
-