NSAttributedString 추가 텍스트 정렬
텍스트 정렬 속성을 NSAttributedString에 추가하여 텍스트를 중앙에 배치하려면 어떻게해야합니까? 편집 : 내가 뭘 잘못하고 있니? 정렬을 변경하지 않는 것 같습니다. CTParagraphStyleSetting setting; setting.spec = kCTParagraphStyleSpecifierAlignment; setting.valueSize = kCTCenterTextAlignment; CTParagraphStyleSetting settings[1] = { {kCTParagraphStyleSpecifierAlignment, sizeof(CGFloat), &setting}, }; CTParagraphStyleRef paragraph = CTParagraphStyleCreate(settings, sizeof(setting)); NSMutableAttributedString *mutableAttributed = [[NSMutableAttributedString alloc] initWithAttributedString:self.attributedString]; [mutableAttributed addAttributes:[NSDictionary dictionaryWithObjectsAndKeys:(NSObject*)paragraph …