Я занимаюсь разработкой приложения для biblkereder. N iPhone / ipad. Я успешно выполнил приложение для iPhone, но в iPad мне нужно представление с несколькими столбцами для отображения стихов. Я использую tableview для отображения стихов. Если глава содержит 50 стихов он должен отображаться в двух столбцах двадцать пять twetyfive.i был поиск в Google для этой информации, но я не получил правильный учебник
- (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];
}
это код для набора стихов в соответствии с главой в iPhone. Но мне нужен разделитель, как в журнальных приложениях на iPad. chapteranderse
- это ярлык. delegate.allSelectedVerseEnglish
- это те, которые содержат стихи.
Заранее спасибо.