Hi, I would like to do something similar to press release detail like New York Times or Usa Today.
I want a scroll with a title, an image and a webview with HTML.
I have done this for now:
But my title is fixed, only webview does scroll, I would like together (title, image,webview) do scroll in the same layer.
How Could I do it? Thanks
I want a scroll with a title, an image and a webview with HTML.
I have done this for now:
Code:
scroll=[[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
//Títle
CGRect tit =CGRectMake(0.0f, 0.0f, 320.f, 50.0f);
UILabel *title=[[UILabel alloc] initWithFrame:tit];
title.text=[itemNew objectForKey:@"title"];
title.numberOfLines = 2;
title.font=[UIFont fontWithName:@"Helvetica" size:16.0f];
title.textColor=[self getColor:@"00336E"];
[scroll addSubview:title];
[title release];
//Message body
webView = [[UIWebView alloc] initWithFrame:CGRectMake(0.0f, 50.0f, 320.0f, 480.0f)];
[self.webView setScalesPageToFit:NO];
NSString *cuerpo=[itemNew objectForKey:@"body"];
[webView loadHTMLString:cuerpo baseURL:nil];
[scroll addSubview:webView];
[webView release];
self.view=scroll;
[scroll release];
But my title is fixed, only webview does scroll, I would like together (title, image,webview) do scroll in the same layer.
How Could I do it? Thanks