Background . I am trying to display a sentence in bold and italics, as well as regular ones.
Question How can I display something like this "Hello, my name is Byte ." Note that the byte is in bold and italics, while other words remain normal.
I tried : I think coreText should be able to do something along this line, I just could not find the right way to do this. I also used TTTAttributeLabel and cannot make it bold and italic. I have Three20 loaded, I just donโt know what and what to use. Webview does not work with my background.
In response to a question from Karl Estavadord :
UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(10, 360, 300, 40)]; [webView setBackgroundColor: [UIColor clearColor]]; [webView loadHTMLString:[NSString stringWithFormat:@"<html><body style=\"background-color: transparent;\">Hello, my name is <b><i>Byte</b></i></body></html>"] baseURL:nil]; [self.view addSubview:webView];
This is exactly the code I used. It displays a white background.
source share