My name is NipinVarma,I would want to know about some errors in my iphone application.I am doing a bible application for a client,i almost complete the functionality s of the application,like authentication ,UI etc etc.sqlite is used for the database of the bible,i want to display the bible sql database in a textview.But i already done this with a tableview controller,every verses and genisis are displayed in tableview according to my needs through array count.My need is to display this in a textview when we open that page for reading bible.here i put my code that gives me the correct input in tableview.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
BibleIphoneAppDelegate *appDelegate = (BibleIphoneAppDelegate *)[[UIApplication sharedApplication] delegate];
return appDelegate.biblearray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
}
cell.detailTextLabel.lineBreakMode = UILineBreakModeWordWrap;
cell.detailTextLabel.numberOfLines = 0;
cell.detailTextLabel.font = [UIFont fontWithName:@"Arial Rounded MT Bold" size:12.0];
// Set up the cell
tbl.separatorColor = [UIColor clearColor];
BibleIphoneAppDelegate *appDelegate = (BibleIphoneAppDelegate *)[[UIApplication sharedApplication] delegate];
bible *jesus = (bible *)[appDelegate.biblearray objectAtIndex:indexPath.row];
[cell setText:jesus.chapterNo];
cell.detailTextLabel.text = jesus.verseNumber;
cell.font = [UIFont systemFontOfSize:9.0];
return cell;
Please help me to do this.
Thanks in advance.
Use didSelectRowAtIndexPath of UITableViewDelegate:
Then in pushChildViewControllerForRow you can do something like:
ChapterViewController might be similar to:
Hope you got an idea.