Reputation: 1245
i am developing a biblkereder application n iPhone/ipad i have done the iPhone application successfully,but in iPad i need a multiple coloum view to display the verses.i am using tableview to display the verses.if the chapter contain 50 verses it need to display in two colums twenty-five twetyfive.i had search lot in google for this implkemntaion but i didn't get the correct tutorial
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [delegate.allSelectedVerseEnglish count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
readCell *cell = (readCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier
] autorelease];
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"readCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
cell.textLabel.font = [UIFont fontWithName:@"Georgia" size:18.0];
cell.textLabel.lineBreakMode = UILineBreakModeWordWrap;
cell.textLabel.numberOfLines = 0;
table.opaque = YES;
table.backgroundColor = [UIColor clearColor];
table.separatorColor = [UIColor clearColor];
cell.chapterAndVerse.text = [NSString stringWithFormat:@"%d",indexPath.row+1];
cell.chapterAndVerse.frame=CGRectMake(0, 10, 20.0, 20.0);
cell.textLabel.text = [NSString stringWithFormat:@" %@",[delegate.allSelectedVerseEnglish objectAtIndex:indexPath.row]];
cell.textLabel.font = [UIFont fontWithName:@"Georgia" size:18.0];
cell.backgroundColor = [UIColor clearColor];
}
this the code for diaplying verses according to chapter in iPhone.but i need a splitvew like the magazine apps in iPad.chapteranderse
is the label.delegate.allSelectedVerseEnglish
is they away which contains verses.
Thanks in advance.
Upvotes: 0
Views: 413
Reputation: 22893
why not use two table views?
Here is my idea.. add two table views on screen.. give them sperate tags and on the touch of a first table's cell reload the second table..
Upvotes: 1