<?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: UITextFields and UIButtons</title>
	<atom:link href="http://idevkit.com/iphonedev/2009/09/uitextfields-and-uibuttons/feed/" rel="self" type="application/rss+xml" />
	<link>http://idevkit.com/iphonedev/2009/09/uitextfields-and-uibuttons/</link>
	<description>An iPhone Developer&#039;s Blog</description>
	<lastBuildDate>Mon, 17 May 2010 23:08:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: sj</title>
		<link>http://idevkit.com/iphonedev/2009/09/uitextfields-and-uibuttons/comment-page-1/#comment-531</link>
		<dc:creator>sj</dc:creator>
		<pubDate>Fri, 22 Jan 2010 08:13:17 +0000</pubDate>
		<guid isPermaLink="false">http://idevkit.com/iphonedev/?p=90#comment-531</guid>
		<description>Alright, so what you have with your button is something that looks like this for the action:
[myButton addTarget:self selector:@selector(clicked:)....and so on whic sends us to your method:
-(void)clicked:(id)sender {
//your code and such
//now lets say we are setting this to DISABLED (lets call it &#039;NO&#039;, unless you wanna get into some weird typedef stuff, lets not for simplicity)
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@&quot;myDefualt&quot;]
}
now what we just did there was create a user default that can be referenced from here on out via the key term @&quot;myDefault&quot;. so, in your applicationDidLaunch method, you can add something like:
if([[NSUserDefaults standardUserDefaults] boolForKey:@&quot;myDefault&quot;]==YES) {
//perform code for enabled button
} else {
//perform code for disabled button
}

hope that helps! and the code here isnt 100% because I am on my PC, just check out the documentation for other support NSUserDefaults, I do like the bool one, I use it in my applications constantly to see whether or not the user has run it before</description>
		<content:encoded><![CDATA[<p>Alright, so what you have with your button is something that looks like this for the action:<br />
[myButton addTarget:self selector:@selector(clicked:)....and so on whic sends us to your method:<br />
-(void)clicked:(id)sender {<br />
//your code and such<br />
//now lets say we are setting this to DISABLED (lets call it 'NO', unless you wanna get into some weird typedef stuff, lets not for simplicity)<br />
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@&#8221;myDefualt&#8221;]<br />
}<br />
now what we just did there was create a user default that can be referenced from here on out via the key term @&#8221;myDefault&#8221;. so, in your applicationDidLaunch method, you can add something like:<br />
if([[NSUserDefaults standardUserDefaults] boolForKey:@&#8221;myDefault&#8221;]==YES) {<br />
//perform code for enabled button<br />
} else {<br />
//perform code for disabled button<br />
}</p>
<p>hope that helps! and the code here isnt 100% because I am on my PC, just check out the documentation for other support NSUserDefaults, I do like the bool one, I use it in my applications constantly to see whether or not the user has run it before</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://idevkit.com/iphonedev/2009/09/uitextfields-and-uibuttons/comment-page-1/#comment-530</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Fri, 22 Jan 2010 03:44:32 +0000</pubDate>
		<guid isPermaLink="false">http://idevkit.com/iphonedev/?p=90#comment-530</guid>
		<description>Great tutorial, thank you for the info.
I was wondering though, do you know how to save the state of a UIButton using NSUserDefaults?  I have a button that becomes disabled when the user taps it, and I just need to find a way to save the disabled state for the next time the user launches the application.  Any help would be great
-thanks again</description>
		<content:encoded><![CDATA[<p>Great tutorial, thank you for the info.<br />
I was wondering though, do you know how to save the state of a UIButton using NSUserDefaults?  I have a button that becomes disabled when the user taps it, and I just need to find a way to save the disabled state for the next time the user launches the application.  Any help would be great<br />
-thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent</title>
		<link>http://idevkit.com/iphonedev/2009/09/uitextfields-and-uibuttons/comment-page-1/#comment-525</link>
		<dc:creator>Laurent</dc:creator>
		<pubDate>Mon, 28 Dec 2009 13:36:42 +0000</pubDate>
		<guid isPermaLink="false">http://idevkit.com/iphonedev/?p=90#comment-525</guid>
		<description>Excellent example, after a lot of search, I finally found a full example on the textfield. Lot of Thx!!</description>
		<content:encoded><![CDATA[<p>Excellent example, after a lot of search, I finally found a full example on the textfield. Lot of Thx!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EdzUp</title>
		<link>http://idevkit.com/iphonedev/2009/09/uitextfields-and-uibuttons/comment-page-1/#comment-234</link>
		<dc:creator>EdzUp</dc:creator>
		<pubDate>Sat, 03 Oct 2009 10:16:45 +0000</pubDate>
		<guid isPermaLink="false">http://idevkit.com/iphonedev/?p=90#comment-234</guid>
		<description>Brilliant example, loads of examples on the net dont show the keyboard setup so easily.</description>
		<content:encoded><![CDATA[<p>Brilliant example, loads of examples on the net dont show the keyboard setup so easily.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saving NSMutableArrays &#187; iDevKit</title>
		<link>http://idevkit.com/iphonedev/2009/09/uitextfields-and-uibuttons/comment-page-1/#comment-176</link>
		<dc:creator>Saving NSMutableArrays &#187; iDevKit</dc:creator>
		<pubDate>Mon, 28 Sep 2009 23:44:29 +0000</pubDate>
		<guid isPermaLink="false">http://idevkit.com/iphonedev/?p=90#comment-176</guid>
		<description>[...] that introduced our world of iDevKit to the UITextField, UILabel, and UIButton, which can be found here. I will give you the set up code here for all the UI today but this will probably be the last time [...]</description>
		<content:encoded><![CDATA[<p>[...] that introduced our world of iDevKit to the UITextField, UILabel, and UIButton, which can be found here. I will give you the set up code here for all the UI today but this will probably be the last time [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
