Skip navigation.
 
mlRe: Centering an NSAttributedString in a line in a view [SOLVED]
FROM : delanoy
DATE : Thu Jul 20 09:17:11 2006

>I think the alignment of the page number is handled by the right-
>aligned tab stop, so changing the alignment of the paragraph won't
>make a difference. You would need to change the 576R tab stop or
>remove the tabs from the string so that it follows the paragraph
>alignment.
>--Michael


>- (NSAttributedString*) pageFooter {
> NSAttributedString* s = [super pageFooter];
> return [s attributedSubstringFromRange:NSMakeRange(1,[s length]-1)];
>}
>  m.


                Thanks to you both Michael and Matt. Matt's solution is
not clean (it makes unwarranted assumptions about the attributed string
returned by the superclass' pageFooter method) and besides it does not
work
on my test example. Michael's solution is simple and covers all cases : I
just
had to add the line

  [parsty setTabStops: [NSArray array]];

at the appropriate place in my code.


                                                        Ewan

Related mailsAuthorDate
mlCentering an NSAttributedString in a line in a view delanoy Jul 18, 19:54
mlRe: Centering an NSAttributedString in a line in a view Matt Neuburg Jul 18, 21:13
mlRe: Centering an NSAttributedString in a line in a view delanoy Jul 19, 11:14
mlRe: Centering an NSAttributedString in a line in a view delanoy Jul 19, 19:50
mlRe: Centering an NSAttributedString in a line in a view Matt Neuburg Jul 19, 20:19
mlRe: Centering an NSAttributedString in a line in a view Michael Tsai Jul 19, 20:29
mlRe: Centering an NSAttributedString in a line in a view Matt Neuburg Jul 19, 21:25
mlRe: Centering an NSAttributedString in a line in a view [SOLVED] delanoy Jul 20, 09:17