<?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 on: Creating Info Button and Increasing Touch Area</title>
	<atom:link href="http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html/feed" rel="self" type="application/rss+xml" />
	<link>http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html</link>
	<description>iOS and Objective-C Tips, Tricks and Tutorials.</description>
	<lastBuildDate>Tue, 22 May 2012 11:53:47 -0500</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: tech_niek</title>
		<link>http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html#comment-66523</link>
		<dc:creator>tech_niek</dc:creator>
		<pubDate>Tue, 31 Jan 2012 22:13:40 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2612#comment-66523</guid>
		<description>Hey Paula,

I wanted to do the same thing, to ensure visibility of the info button.
So I made 2 UIButtons with the same position, linked to the same IBAction. (Yah, you guessed right: &quot;btnInfoDark&quot; of type &#039;Info Dark&#039;, and &quot;btnInfoLight&quot; of type &#039;Info Light&#039;)

When I had a dark background I hid btnInfoDark with .btnInfoDark.hidden = TRUE; and did the same for the light background .btnInfoLight.hidden = TRUE;
I was setting the view background with self.backgroundColor = [UIColor ], so I knew the background color. But you could also get the background of the object/view behind by checking its .background property.

Finding out when the color is somewhat dark or light remains another matter. Maybe this thread can help you calculate the darkness of a given color: http://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color.

PS
cmdButton.doThisExtremelyCommonThingForMeToo = TRUE</description>
		<content:encoded><![CDATA[<p>Hey Paula,</p>
<p>I wanted to do the same thing, to ensure visibility of the info button.<br />
So I made 2 UIButtons with the same position, linked to the same IBAction. (Yah, you guessed right: &#8220;btnInfoDark&#8221; of type &#8216;Info Dark&#8217;, and &#8220;btnInfoLight&#8221; of type &#8216;Info Light&#8217;)</p>
<p>When I had a dark background I hid btnInfoDark with .btnInfoDark.hidden = TRUE; and did the same for the light background .btnInfoLight.hidden = TRUE;<br />
I was setting the view background with self.backgroundColor = [UIColor ], so I knew the background color. But you could also get the background of the object/view behind by checking its .background property.</p>
<p>Finding out when the color is somewhat dark or light remains another matter. Maybe this thread can help you calculate the darkness of a given color: <a href="http://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color" rel="nofollow">http://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color</a>.</p>
<p>PS<br />
cmdButton.doThisExtremelyCommonThingForMeToo = TRUE</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sneha Bhoyar</title>
		<link>http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html#comment-29590</link>
		<dc:creator>Sneha Bhoyar</dc:creator>
		<pubDate>Fri, 29 Oct 2010 04:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2612#comment-29590</guid>
		<description>Please can anyone tell me how to increase the size of info button???Is it possible to do..Reply..
Thanks</description>
		<content:encoded><![CDATA[<p>Please can anyone tell me how to increase the size of info button???Is it possible to do..Reply..<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Muchow</title>
		<link>http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html#comment-15961</link>
		<dc:creator>John Muchow</dc:creator>
		<pubDate>Thu, 27 May 2010 17:58:16 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2612#comment-15961</guid>
		<description>Paula, I&#039;m not sure I entirely understand what you are trying to do...however, you can look at the buttonType property for a UIButton and determine if it&#039;s UIButtonTypeInfoLight or UIButtonTypeInfoDark.</description>
		<content:encoded><![CDATA[<p>Paula, I&#8217;m not sure I entirely understand what you are trying to do&#8230;however, you can look at the buttonType property for a UIButton and determine if it&#8217;s UIButtonTypeInfoLight or UIButtonTypeInfoDark.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paula</title>
		<link>http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html#comment-15959</link>
		<dc:creator>Paula</dc:creator>
		<pubDate>Thu, 27 May 2010 16:51:31 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2612#comment-15959</guid>
		<description>How do I detect what color is under the InfoButton... so I can change the button
from DARK to LIGHT?
 
I set my view&#039;s color... but how do I tell if it&#039;s &quot;kind of light&quot; or &quot;kind of dark&quot;?

Besides... I can&#039;t change the info-button from light to dark anyway.  (read only)

Ugh.

Shouldn&#039;t Apple have some kind of a simple &quot;cmdButton.doThisExtremelyCommonThingForMe = TRUE&quot; statement?

InfoButtons are useless if you can&#039;t even see them.</description>
		<content:encoded><![CDATA[<p>How do I detect what color is under the InfoButton&#8230; so I can change the button<br />
from DARK to LIGHT?</p>
<p>I set my view&#8217;s color&#8230; but how do I tell if it&#8217;s &#8220;kind of light&#8221; or &#8220;kind of dark&#8221;?</p>
<p>Besides&#8230; I can&#8217;t change the info-button from light to dark anyway.  (read only)</p>
<p>Ugh.</p>
<p>Shouldn&#8217;t Apple have some kind of a simple &#8220;cmdButton.doThisExtremelyCommonThingForMe = TRUE&#8221; statement?</p>
<p>InfoButtons are useless if you can&#8217;t even see them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dorald</title>
		<link>http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html#comment-4896</link>
		<dc:creator>Dorald</dc:creator>
		<pubDate>Wed, 09 Sep 2009 23:25:14 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2612#comment-4896</guid>
		<description>@Tom

thanks thanks thanks ... :) :) :)</description>
		<content:encoded><![CDATA[<p>@Tom</p>
<p>thanks thanks thanks &#8230; :) :) :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html#comment-4885</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 09 Sep 2009 05:05:55 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2612#comment-4885</guid>
		<description>@Dorald
How to fade out info button after some seconds ???

[button setAlpha: 1.0f];

[UIView beginAnimations: nil context:NULL];
// time delay in seconds to start
[UIView setAnimationDelay:2.0f];
// time in seconds for the fading, 0.25sec is the default apple time for small animations
[UIView setAnimationDuration:0.25f];
[UIView setAnimationBeginsFromCurrentState: YES];
[button setAlpha: 0.0f];
[UIView commitAnimations];</description>
		<content:encoded><![CDATA[<p>@Dorald<br />
How to fade out info button after some seconds ???</p>
<p>[button setAlpha: 1.0f];</p>
<p>[UIView beginAnimations: nil context:NULL];<br />
// time delay in seconds to start<br />
[UIView setAnimationDelay:2.0f];<br />
// time in seconds for the fading, 0.25sec is the default apple time for small animations<br />
[UIView setAnimationDuration:0.25f];<br />
[UIView setAnimationBeginsFromCurrentState: YES];<br />
[button setAlpha: 0.0f];<br />
[UIView commitAnimations];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dorald</title>
		<link>http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html#comment-4683</link>
		<dc:creator>Dorald</dc:creator>
		<pubDate>Sun, 30 Aug 2009 23:16:34 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2612#comment-4683</guid>
		<description>thanks a lot for your help guys !!

How to fade out info button after some seconds ???

any example code plzz..</description>
		<content:encoded><![CDATA[<p>thanks a lot for your help guys !!</p>
<p>How to fade out info button after some seconds ???</p>
<p>any example code plzz..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Didier Prophete</title>
		<link>http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html#comment-4152</link>
		<dc:creator>Didier Prophete</dc:creator>
		<pubDate>Sat, 25 Jul 2009 06:32:02 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2612#comment-4152</guid>
		<description>@Luca: make sure your button is correctly bound to a your variable &#039;btnAbout&#039; in Interface Builder. If you forgot to bind it, you will basically send the setFrame message to nil and you won&#039;t get a runtime error (it&#039;s either a good or bad feature of obj c, depending on how you look at it...)

I am saying this because I used IB to create my interface, added the code at the beginning of viewDidLoad and it works like a charm...</description>
		<content:encoded><![CDATA[<p>@Luca: make sure your button is correctly bound to a your variable &#8216;btnAbout&#8217; in Interface Builder. If you forgot to bind it, you will basically send the setFrame message to nil and you won&#8217;t get a runtime error (it&#8217;s either a good or bad feature of obj c, depending on how you look at it&#8230;)</p>
<p>I am saying this because I used IB to create my interface, added the code at the beginning of viewDidLoad and it works like a charm&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luca</title>
		<link>http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html#comment-4124</link>
		<dc:creator>Luca</dc:creator>
		<pubDate>Wed, 22 Jul 2009 16:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2612#comment-4124</guid>
		<description>Hi thanks for the answer. 
It didn&#039;t work for the button created in the interface builder. 
It seems that the frame values for the info button are somehow locked if the button is created in the IB. 
Btw creating the button programmatically works smoothly. 
Thanks a lot for your code. It helped me a lot.
Luca</description>
		<content:encoded><![CDATA[<p>Hi thanks for the answer.<br />
It didn&#8217;t work for the button created in the interface builder.<br />
It seems that the frame values for the info button are somehow locked if the button is created in the IB.<br />
Btw creating the button programmatically works smoothly.<br />
Thanks a lot for your code. It helped me a lot.<br />
Luca</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Didier Prophete</title>
		<link>http://MobileDeveloperTips.com/user-interface/creating-info-button-and-increasing-touch-area.html#comment-4119</link>
		<dc:creator>Didier Prophete</dc:creator>
		<pubDate>Wed, 22 Jul 2009 05:20:40 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2612#comment-4119</guid>
		<description>@Luca: just put it in the viewDidLoad function in your ViewController class. And no, it&#039;s not a silly question. We&#039;ve all been there at some point or another. Good luck.</description>
		<content:encoded><![CDATA[<p>@Luca: just put it in the viewDidLoad function in your ViewController class. And no, it&#8217;s not a silly question. We&#8217;ve all been there at some point or another. Good luck.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

