my .h file looks like this
@interface EventCell : UITableViewCell {
UILabel *TitleLabel;
UILabel *DateLabel;
UIWebView *LocationLabel;
}
@property (nonatomic, retain) IBOutlet UILabel *TitleLabel;
@property (nonatomic, retain) IBOutlet UILabel *DateLabel;
@property (nonatomic, retain) IBOutlet UIWebView *LocationLabel;
@end
and in interface building my UILabel are connected just fine. When menu clicking on the objects in interface builder, I could see my corresponding variables to connect them to. But for the UIWebView I cannot see what to connect it to. Menu clicking on it just shows delegate
and I can drag it to something but I don't see how to connect it to my location label
variable
help? I feel like I am missing something very obvious. insight appreciated
the root problem is displaying string information (with some html formatting) inside this web view, which currently doesn't show my string data because it isn't connected to the controller
you should read again the documentation about UIWebView class. Well at first
the root problem is displaying string information (with some html formatting) inside this web view, which currently doesn't show my string data because it isn't connected to the controller
I'm not sure if i get it right. Are you trying to put UILabels into your UIWebView instance? Instead of putting the labels into your webview you can simply pat the text right into your html code -> create method which will have 2 input parameters:
In the method you will construct your html code ( or read from file ) and after that you will load it to the webview.
That should do the stuff, check out some UIWebview examples on the internet.
Secondly: Go to Interface builder ( open xib of your uitableviewcell subclass again) and select the file owner object in the left pane. Now, simply hold ctrl key and connect your file owner with UIWebview (left click on your mouse + drag ). If you want to set UIWebview's delegate, do the same stuff, but in reverse way. select uiwebview object, hold ctrk + left click + drag to File owner's object -> there you go.
PS: Do you really need UIWebview in your cell? Isn't there any other way to achieve your goal? avoid things like -> downloading content from the internet right into your webview instance of your tableview cell -> this will kill performance of your app
well if i haven't answered your question, try to explain what you're planning to do -> what you want to present in your cell -> ( have you prepared the data in some array like object or do you want to get them online? is it really necessary to use uiwebview in your case? )