Lug 20
GSFancyText è una libreria oper source che permette una formattazione del testo senza usare il componente UIWebView.
Supporta CSS e tra i più comuni tag HTML.
Un piccolo esempio:
NSString* styleSheet = @".green {color:#00ff00; font-weight:bold}";
[GSFancyText parseStyleAndSetGlobal: styleSheet];
GSFancyText* fancyText = [[GSFancyText alloc] initWithMarkupText: @"Hulu Plus"];
Due modi per visualizzare un fancy text:
Attraverso un GSFancyTextView
GSFancyTextView* fancyView = [[GSFancyTextView alloc] initWithFrame: CGRectMake(0, 0, 100, 200) fancyText: fancyText]; [self.view addSubview: fancyView];
Oppure direttamente in un UIView
[fancyText drawInRect: rect];
Ultimi Commenti