开发者

A Label in View with UIWebView

开发者 https://www.devze.com 2023-03-03 04:02 出处:网络
I have a View, i would like to put a test ( a UILabel) witch when clicking it, it open me a web View w开发者_开发百科ith an URL ( WWW.mySite.com).

I have a View, i would like to put a test ( a UILabel) witch when clicking it, it open me a web View w开发者_开发百科ith an URL ( WWW.mySite.com). How i can do this please ?

thanks for your answers


Use a button, put the text into the button, hook up the actions from the button pressedUpInside to a function which will call the UIWebView's - (void)loadRequest:(NSURLRequest *)request with your URL.


Look up Apple documentation on UIWebView and use a UIButton connected to an IBAction. Always turn to the documentation when these kinds of questions come up. It is really through and usually pretty well done.

0

精彩评论

暂无评论...
验证码 换一张
取 消