Re: Centering an NSAttributedString in a line in a view [SOLVED]
Re: Centering an NSAttributedString in a line in a view [SOLVED]
- Subject: Re: Centering an NSAttributedString in a line in a view [SOLVED]
- From: email@hidden
- Date: Thu, 20 Jul 2006 09:17:11 +0200 (CEST)
- Importance: Normal
>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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden