7
NSAttributedString agregar alineación de texto
¿Cómo puedo agregar un atributo de alineación de texto a un NSAttributedString para centrar el texto? Editar: ¿Estoy haciendo algo mal? No parece cambiar la alineación. CTParagraphStyleSetting setting; setting.spec = kCTParagraphStyleSpecifierAlignment; setting.valueSize = kCTCenterTextAlignment; CTParagraphStyleSetting settings[1] = { {kCTParagraphStyleSpecifierAlignment, sizeof(CGFloat), &setting}, }; CTParagraphStyleRef paragraph = CTParagraphStyleCreate(settings, sizeof(setting)); NSMutableAttributedString *mutableAttributed = …