<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for iCab Blog</title>
	<atom:link href="http://www.icab.de/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.icab.de/blog</link>
	<description>iCab related stuff; Mac, iPhone and Cocoa programming</description>
	<lastBuildDate>Fri, 10 Sep 2010 12:44:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>Comment on Customize the contextual menu of UIWebView by shetainniseri</title>
		<link>http://www.icab.de/blog/2010/07/11/customize-the-contextual-menu-of-uiwebview/comment-page-1/#comment-4131</link>
		<dc:creator>shetainniseri</dc:creator>
		<pubDate>Fri, 10 Sep 2010 12:44:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=159#comment-4131</guid>
		<description>Hi Iam Prabhu  from chennai,joined today in this forum... :)</description>
		<content:encoded><![CDATA[<p>Hi Iam Prabhu  from chennai,joined today in this forum&#8230; <img src='http://www.icab.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customize the contextual menu of UIWebView by Alexander</title>
		<link>http://www.icab.de/blog/2010/07/11/customize-the-contextual-menu-of-uiwebview/comment-page-1/#comment-4120</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Thu, 09 Sep 2010 20:32:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=159#comment-4120</guid>
		<description>@Enzo
Sorry, but I don&#039;t know if you can directly access the character at a certain coordinate very easy. In case you can work with the selected text (in case there&#039;s a text selection), you may use &quot;window.getSelection()&quot; to get the text that is selected.</description>
		<content:encoded><![CDATA[<p>@Enzo<br />
Sorry, but I don&#8217;t know if you can directly access the character at a certain coordinate very easy. In case you can work with the selected text (in case there&#8217;s a text selection), you may use &#8220;window.getSelection()&#8221; to get the text that is selected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customize the contextual menu of UIWebView by Alexander</title>
		<link>http://www.icab.de/blog/2010/07/11/customize-the-contextual-menu-of-uiwebview/comment-page-1/#comment-4119</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Thu, 09 Sep 2010 20:21:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=159#comment-4119</guid>
		<description>@Ky
I think, if you create a &quot;style&quot; element you can not set the CSS properties using &quot;innerHTML&quot;.
You have to add the &quot;style&quot; element to the &quot;head&quot; section of the document and then use the &quot;insertRule()&quot; funtion of the style object to add your stylesheet rules.

Something like this should work:

var style = document.createElement(&quot;style&quot;);
document.getElementsByTagName(&quot;head&quot;)[0].appendChild(style);
var count = document.styleSheets.length-1;
document.styleSheets[count-1].insertRule(
                             &quot;.fbxWelcomeBoxName {display:block;...}&quot;);</description>
		<content:encoded><![CDATA[<p>@Ky<br />
I think, if you create a &#8220;style&#8221; element you can not set the CSS properties using &#8220;innerHTML&#8221;.<br />
You have to add the &#8220;style&#8221; element to the &#8220;head&#8221; section of the document and then use the &#8220;insertRule()&#8221; funtion of the style object to add your stylesheet rules.</p>
<p>Something like this should work:</p>
<p>var style = document.createElement(&#8220;style&#8221;);<br />
document.getElementsByTagName(&#8220;head&#8221;)[0].appendChild(style);<br />
var count = document.styleSheets.length-1;<br />
document.styleSheets[count-1].insertRule(<br />
                             &#8220;.fbxWelcomeBoxName {display:block;&#8230;}&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customize the contextual menu of UIWebView by Enzo</title>
		<link>http://www.icab.de/blog/2010/07/11/customize-the-contextual-menu-of-uiwebview/comment-page-1/#comment-4106</link>
		<dc:creator>Enzo</dc:creator>
		<pubDate>Thu, 09 Sep 2010 06:01:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=159#comment-4106</guid>
		<description>A great article! Thanks for sharing!

With document.elementFromPoint(x,y) it is possible to get the elements the user pointed on, but does someone have an idea how I can identify the concrete characters under my tap? A result represented as a Range() object would be great. Thanks.</description>
		<content:encoded><![CDATA[<p>A great article! Thanks for sharing!</p>
<p>With document.elementFromPoint(x,y) it is possible to get the elements the user pointed on, but does someone have an idea how I can identify the concrete characters under my tap? A result represented as a Range() object would be great. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customize the contextual menu of UIWebView by Ky</title>
		<link>http://www.icab.de/blog/2010/07/11/customize-the-contextual-menu-of-uiwebview/comment-page-1/#comment-4104</link>
		<dc:creator>Ky</dc:creator>
		<pubDate>Wed, 08 Sep 2010 23:46:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=159#comment-4104</guid>
		<description>Alexander,
Thank you for the great tutorial and the iCab Mobile app is great too. I have one question about this UIWebView stuff. I want to apply some css to a page after it is done loading but it doesn&#039;t seem to work.  I made a javascript function to add the style and then invoke the javascript function but nothing happened.  It seems like the webview doesn&#039;t apply the newly added style. Do you know why?

Here is the function:
function MyFunction_AddCSS() 						
 {var newstyle = document.createElement(&#039;style&#039;); 						 newstyle.innerHTML = &#039;.fbxWelcomeBoxName {display:block;font-weight:color:#ff0000;normal;padding:4px 0 1px;width:112px;word-wrap:break-word;}&#039;;						 
document.head.appendChild(newstyle);
}</description>
		<content:encoded><![CDATA[<p>Alexander,<br />
Thank you for the great tutorial and the iCab Mobile app is great too. I have one question about this UIWebView stuff. I want to apply some css to a page after it is done loading but it doesn&#8217;t seem to work.  I made a javascript function to add the style and then invoke the javascript function but nothing happened.  It seems like the webview doesn&#8217;t apply the newly added style. Do you know why?</p>
<p>Here is the function:<br />
function MyFunction_AddCSS()<br />
 {var newstyle = document.createElement(&#8216;style&#8217;); 						 newstyle.innerHTML = &#8216;.fbxWelcomeBoxName {display:block;font-weight:color:#ff0000;normal;padding:4px 0 1px;width:112px;word-wrap:break-word;}&#8217;;<br />
document.head.appendChild(newstyle);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by dRine</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-2/#comment-4088</link>
		<dc:creator>dRine</dc:creator>
		<pubDate>Wed, 08 Sep 2010 08:38:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-4088</guid>
		<description>Thank you so much ! 
I&#039;ve read it was something like that on the apple developer forum but the solutions were wrong. Instead, YOU are totally right !
Thanks for your quick answer !!</description>
		<content:encoded><![CDATA[<p>Thank you so much !<br />
I&#8217;ve read it was something like that on the apple developer forum but the solutions were wrong. Instead, YOU are totally right !<br />
Thanks for your quick answer !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by Alexander</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-2/#comment-4087</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Wed, 08 Sep 2010 08:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-4087</guid>
		<description>@dRine

Probably, Xcode does not treat the .js file as resource file. And so it tries to compile it instead of copying it into as resource into the app bundle.

To fix this, look into the sidebar of the project window in XCode and locate the section &quot;targets&quot;. Here you should move the .js file from &quot;compile source&quot; to &quot;copy bundle resources&quot; section.</description>
		<content:encoded><![CDATA[<p>@dRine</p>
<p>Probably, Xcode does not treat the .js file as resource file. And so it tries to compile it instead of copying it into as resource into the app bundle.</p>
<p>To fix this, look into the sidebar of the project window in XCode and locate the section &#8220;targets&#8221;. Here you should move the .js file from &#8220;compile source&#8221; to &#8220;copy bundle resources&#8221; section.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Search and highlight text in UIWebView by dRine</title>
		<link>http://www.icab.de/blog/2010/01/12/search-and-highlight-text-in-uiwebview/comment-page-2/#comment-4086</link>
		<dc:creator>dRine</dc:creator>
		<pubDate>Wed, 08 Sep 2010 07:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=110#comment-4086</guid>
		<description>Hi,
Very helpful post, thanks a lot !
Unfortunately, I&#039;ve got a little problem with it. If I put some javascript directly in my Objective-C code, no problem. But now, I&#039;ve put some more complex code in a .js file. The problem is that the mainBundle can&#039;t find it. I&#039;ve put my .js file in my Resources folder. I&#039;ve also tried with a .txt. I really don&#039;t understand.
Have you an idea of what the problem is ?
thanks a lot !</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Very helpful post, thanks a lot !<br />
Unfortunately, I&#8217;ve got a little problem with it. If I put some javascript directly in my Objective-C code, no problem. But now, I&#8217;ve put some more complex code in a .js file. The problem is that the mainBundle can&#8217;t find it. I&#8217;ve put my .js file in my Resources folder. I&#8217;ve also tried with a .txt. I really don&#8217;t understand.<br />
Have you an idea of what the problem is ?<br />
thanks a lot !</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customize the contextual menu of UIWebView by steve</title>
		<link>http://www.icab.de/blog/2010/07/11/customize-the-contextual-menu-of-uiwebview/comment-page-1/#comment-4054</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Sat, 04 Sep 2010 12:22:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=159#comment-4054</guid>
		<description>Hello, thanks for this ! It&#039;s working great :)
I&#039;m using UITabBar, and I had to put the addObserver in the viewWillAppear method and a removeObserver in viewWillDisappear  method, so notifications are not handled when UIWebView is not shown !</description>
		<content:encoded><![CDATA[<p>Hello, thanks for this ! It&#8217;s working great <img src='http://www.icab.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I&#8217;m using UITabBar, and I had to put the addObserver in the viewWillAppear method and a removeObserver in viewWillDisappear  method, so notifications are not handled when UIWebView is not shown !</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Changing the headers for UIWebKit HTTP requests by Alexander</title>
		<link>http://www.icab.de/blog/2010/04/07/changing-the-headers-for-uiwebkit-http-requests/comment-page-1/#comment-3990</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Mon, 30 Aug 2010 20:04:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=144#comment-3990</guid>
		<description>@Peter
I assume that UIWebView treats each frame of the stream as new &quot;web page&quot;,  so you would need to set the META tag for each frame, and unfortunately this is not possible with the limited API of the iOS.

But you should try to embed the image stream using the IMG tag within a simple HTML document. This way UIWebView has to deal only with one single HTML document.</description>
		<content:encoded><![CDATA[<p>@Peter<br />
I assume that UIWebView treats each frame of the stream as new &#8220;web page&#8221;,  so you would need to set the META tag for each frame, and unfortunately this is not possible with the limited API of the iOS.</p>
<p>But you should try to embed the image stream using the IMG tag within a simple HTML document. This way UIWebView has to deal only with one single HTML document.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Changing the headers for UIWebKit HTTP requests by Peter</title>
		<link>http://www.icab.de/blog/2010/04/07/changing-the-headers-for-uiwebkit-http-requests/comment-page-1/#comment-3956</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Sat, 28 Aug 2010 10:50:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=144#comment-3956</guid>
		<description>@Alexander
Yes that&#039;s what I mean, because it&#039;s a stream, the method doesn&#039;t get called.  It&#039;s MJPEG from an IP camera (example: http://ycamitaly.dtdns.net:8150/stream.jpg  guest,guest).  Displays fine, but i can&#039;t find a way to change UIWebView scaling.  The back ground thread approach seems to change the scale, but only until the next frame is received. very frustrating.</description>
		<content:encoded><![CDATA[<p>@Alexander<br />
Yes that&#8217;s what I mean, because it&#8217;s a stream, the method doesn&#8217;t get called.  It&#8217;s MJPEG from an IP camera (example: <a href="http://ycamitaly.dtdns.net:8150/stream.jpg" rel="nofollow">http://ycamitaly.dtdns.net:8150/stream.jpg</a>  guest,guest).  Displays fine, but i can&#8217;t find a way to change UIWebView scaling.  The back ground thread approach seems to change the scale, but only until the next frame is received. very frustrating.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Changing the headers for UIWebKit HTTP requests by Alexander</title>
		<link>http://www.icab.de/blog/2010/04/07/changing-the-headers-for-uiwebkit-http-requests/comment-page-1/#comment-3946</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Fri, 27 Aug 2010 16:01:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=144#comment-3946</guid>
		<description>@Peter
Have you correctly set the delegate for the UIWebView object? If it is never called because the web page never &quot;finishes&quot; to load, then you are in &quot;trouble&quot; ;-) What is the web page you&#039;re having trouble with? Is this really a web page with real HTML code? Or is this a video stream without any HTML code in which it is embedded? If it is the latter, I assume you can&#039;t add a META tag in something that is not HTML.</description>
		<content:encoded><![CDATA[<p>@Peter<br />
Have you correctly set the delegate for the UIWebView object? If it is never called because the web page never &#8220;finishes&#8221; to load, then you are in &#8220;trouble&#8221; <img src='http://www.icab.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  What is the web page you&#8217;re having trouble with? Is this really a web page with real HTML code? Or is this a video stream without any HTML code in which it is embedded? If it is the latter, I assume you can&#8217;t add a META tag in something that is not HTML.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Changing the headers for UIWebKit HTTP requests by Peter</title>
		<link>http://www.icab.de/blog/2010/04/07/changing-the-headers-for-uiwebkit-http-requests/comment-page-1/#comment-3942</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Fri, 27 Aug 2010 10:19:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=144#comment-3942</guid>
		<description>@Alexander  Thanks for the response!  I tried some js viewport manipulation from webViewDidFinishLoad.  But this method never gets called (stream), so I tried on a background thread, but the next frame of video seems to overwrite the change.  So now I&#039;m thinking I need to somehow intercept the http response to insert the viewport meta change...  I&#039;m really hoping I don&#039;t need to parse the mjpeg stream manually, but UIWebView doesn&#039;t seem to expose enough control.</description>
		<content:encoded><![CDATA[<p>@Alexander  Thanks for the response!  I tried some js viewport manipulation from webViewDidFinishLoad.  But this method never gets called (stream), so I tried on a background thread, but the next frame of video seems to overwrite the change.  So now I&#8217;m thinking I need to somehow intercept the http response to insert the viewport meta change&#8230;  I&#8217;m really hoping I don&#8217;t need to parse the mjpeg stream manually, but UIWebView doesn&#8217;t seem to expose enough control.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Changing the headers for UIWebKit HTTP requests by Alexander</title>
		<link>http://www.icab.de/blog/2010/04/07/changing-the-headers-for-uiwebkit-http-requests/comment-page-1/#comment-3902</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Tue, 24 Aug 2010 19:59:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=144#comment-3902</guid>
		<description>@Peter
The scaling can be changed using META tags (see the &quot;Safari Web Content Guide&quot; for the iPhone from Apple, especially the &quot;Customizing the viewport&quot; section). So you can overwrite the default scaling by inserting a META tag into the head section of the HTML code of the web page with the new scaling definition. This can be done via JavaScript (injecting the JavaScript code can be done with the method &quot;stringByEvaluatingJavaScriptFromString:&quot; of the UIWebView class).</description>
		<content:encoded><![CDATA[<p>@Peter<br />
The scaling can be changed using META tags (see the &#8220;Safari Web Content Guide&#8221; for the iPhone from Apple, especially the &#8220;Customizing the viewport&#8221; section). So you can overwrite the default scaling by inserting a META tag into the head section of the HTML code of the web page with the new scaling definition. This can be done via JavaScript (injecting the JavaScript code can be done with the method &#8220;stringByEvaluatingJavaScriptFromString:&#8221; of the UIWebView class).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customize the contextual menu of UIWebView by Alexander</title>
		<link>http://www.icab.de/blog/2010/07/11/customize-the-contextual-menu-of-uiwebview/comment-page-1/#comment-3901</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Tue, 24 Aug 2010 18:39:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.icab.de/blog/?p=159#comment-3901</guid>
		<description>@Robin
First of all, customizing the contextual menu of UIWebView is a more complex task,so this is not really a good start for someone new to iPhone developement. You have to overwrite a class, creating a category for another, use Notifications, implement delegate methods , write code in Objective C and also in JavaScript.
Though each of these topics  is &quot;basic&quot; stuff, you need some experience to understand how this works together. So if you are new to iPhone programming, you should start with some more simpler tasks first. 
My example code should show a way how to implement certain features, but because the details of these features will be different in each App, it doesn&#039;t make sense to show much more than the basics of the implementation in the blog post. Otherwise the example code would get much larger and more difficult to read. There would be too much stuff included which isn&#039;t really important for the basic idea.

If need more detailed help, please write an email and please include some more details about your  concrete problem.</description>
		<content:encoded><![CDATA[<p>@Robin<br />
First of all, customizing the contextual menu of UIWebView is a more complex task,so this is not really a good start for someone new to iPhone developement. You have to overwrite a class, creating a category for another, use Notifications, implement delegate methods , write code in Objective C and also in JavaScript.<br />
Though each of these topics  is &#8220;basic&#8221; stuff, you need some experience to understand how this works together. So if you are new to iPhone programming, you should start with some more simpler tasks first.<br />
My example code should show a way how to implement certain features, but because the details of these features will be different in each App, it doesn&#8217;t make sense to show much more than the basics of the implementation in the blog post. Otherwise the example code would get much larger and more difficult to read. There would be too much stuff included which isn&#8217;t really important for the basic idea.</p>
<p>If need more detailed help, please write an email and please include some more details about your  concrete problem.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
