I have a DetailView Controller that is being pushed from a UITableView Controller. What I am trying to do is change the font of the title when it is pushed from the UITableViewController. I will show you the lines of code for my segue where I am doing it.
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
//push segue identifier 'showArrayDetail'
if ([[segue identifier] isEqualToString:@"ShowDetail"])
{
NSString *object = nil;
[[segue destinationViewController] setDetailLabelContents:object];
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
DetailViewController *destViewController = segue.destinationViewController;
destViewController.climbName = climbs[indexPath.row];
destViewController.title = [NSString stringWithFormat:@"%@ Details", destViewController.climbName];
destViewController.title = [UIFont fontWithName:@"Chalkduster" size:17];
}
}
The very last line is where I am trying to change the font, it is giving me this warning:
FourthTableViewController.m:134:34: Incompatible pointer types assigning to 'NSString *' from
'UIFont *
Is there a way to parse the title or a way around this? I am doing this same method when changing my font inside my UITableViews, etc. It just doesn't like when you do it to the title.
Thanks