aligner le texte à l'aide de drawInRect:withAttributes:

Dans l'iOS 5 version de mon application, j'ai eu:

[self.text drawInRect: stringRect
             withFont: [UIFont fontWithName: @"Courier" size: kCellFontSize]
        lineBreakMode: NSLineBreakByTruncatingTail
            alignment: NSTextAlignmentRight];

Je me suis mise à niveau pour iOS 7. La méthode ci-dessus est obsolète. Je suis maintenant à l'aide de drawInRect:withAttributes:. Le attributs paramètre est un NSDictionary objet. Je peux obtenir drawInRect:withAttributes: de travail pour l'ex police paramètre à l'aide de ceci:

      UIFont *font = [UIFont fontWithName: @"Courier" size: kCellFontSize];

      NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: font, NSFontAttributeName,
                                  nil];

      [self.text drawInRect: stringRect
             withAttributes: dictionary];

Ce que les paires clé-valeur dois-je ajouter à dictionnaire pour obtenir NSLineBreakByTruncatingTail et NSTextAlignmentRight?