Post

Replies

Boosts

Views

Activity

Reply to Problem with text alignment in NSAttributedString
Sorry I forgot a line of code in my explanation:As PBK mentionned too.// create a paragraph style to define my text alignmentNSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];paragraphStyle.alignment = NSTextAlignmentRight;[userAttributes setObject:paragraphStyle forKey:NSParagraphStyleAttributeName];// create an NSAttributedString and add text properties to itNSAttributedString *attrString = [[NSAttributedString alloc] initWithString:myString attributes:userAttributes];// draw the "attributed string" at a given point[attrString drawAtPoint:NSMakePoint(myXTLval,myYTLval)];Thank you both for feedback.But this is how it still not work.
Dec ’19