<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jiramot.info &#187; iphone</title>
	<atom:link href="http://www.jiramot.info/tag/iphone/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jiramot.info</link>
	<description>Developer&#039;s Life</description>
	<lastBuildDate>Mon, 06 Feb 2012 08:49:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>How to check internet connection in iOS</title>
		<link>http://www.jiramot.info/how-to-check-internet-connection-in-ios</link>
		<comments>http://www.jiramot.info/how-to-check-internet-connection-in-ios#comments</comments>
		<pubDate>Wed, 21 Sep 2011 15:43:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=1092</guid>
		<description><![CDATA[<p>Here is its usage:</p> if ([Connection isConnected]) { ... } else { ... } // // Connection.h // iBlog // // Created by Ondrej Rafaj on 12.11.09. // Copyright 2009 Home. All rights reserved. // #import #import #import #import #import @interface Connection : NSObject { } + (BOOL) isConnected; @end <p></p> // // Connection.m [...]]]></description>
			<content:encoded><![CDATA[<p>Here is its usage:</p>
<pre>
if ([Connection isConnected]) {  ...  }
else {  ...  }
</pre>
<pre>
//
//  Connection.h
//  iBlog
//
//  Created by Ondrej Rafaj on 12.11.09.
//  Copyright 2009 Home. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <netinet/in.h>
#import <arpa/inet.h>
#import <netdb.h>  

@interface Connection : NSObject {  

}  

+ (BOOL) isConnected;  

@end
</pre>
<p><span id="more-1092"></span></p>
<pre>
//
//  Connection.m
//  iBlog
//
//  Created by Ondrej Rafaj on 12.11.09.
//  Copyright 2009 Home. All rights reserved.
//  

#import "Connection.h"  

@implementation Connection  

+ (BOOL) isConnected {
    // Create zero addy
    struct sockaddr_in zeroAddress;
    bzero(&#038;zeroAddress, sizeof(zeroAddress));
    zeroAddress.sin_len = sizeof(zeroAddress);
    zeroAddress.sin_family = AF_INET;
    // Recover reachability flags
    SCNetworkReachabilityRef defaultRouteReachability = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *)&#038;zeroAddress);
    SCNetworkReachabilityFlags flags;
    BOOL didRetrieveFlags = SCNetworkReachabilityGetFlags(defaultRouteReachability, &#038;flags);
    CFRelease(defaultRouteReachability);
    if (!didRetrieveFlags) {
        NSLog(@"Error. Could not recover network reachability flags");
        return NO;
    }
    BOOL isReachable = flags &#038; kSCNetworkFlagsReachable;
    BOOL needsConnection = flags &#038; kSCNetworkFlagsConnectionRequired;
    BOOL nonWiFi = flags &#038; kSCNetworkReachabilityFlagsTransientConnection;
    NSURL *testURL = [NSURL URLWithString:@"http://www.google.com/"];
    NSURLRequest *testRequest = [NSURLRequest requestWithURL:testURL  cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:20.0];
    NSURLConnection *testConnection = [[[NSURLConnection alloc] initWithRequest:testRequest delegate:self] autorelease];
    return ((isReachable &#038;&#038; !needsConnection) || nonWiFi) ? (testConnection ? YES : NO) : NO;
}  

@end
</pre>
<p><strong>Don&#8217;t forgot to include SystemConfiguration and libz.1.1.3.dylib</strong><br />
<a href="http://www.jiramot.info/wp-content/uploads/2011/09/Connection.zip" >Download Here</a></p>
<p>Thanks <a target="_blank" rel="nofollow" href="http://www.jiramot.info/goto/http://www.xprogress.com/post-40-iphone-internet-connection-check-wifi-3g-edge-something-like-reachability-h/" >Ondrej Rafaj</a> for make this <img src='http://www.jiramot.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/how-to-check-internet-connection-in-ios/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force change UI orientation</title>
		<link>http://www.jiramot.info/force-change-ui-orientation</link>
		<comments>http://www.jiramot.info/force-change-ui-orientation#comments</comments>
		<pubDate>Wed, 21 Sep 2011 15:33:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=1089</guid>
		<description><![CDATA[<p>This method link a toggle function to change between lanscape to protrait</p> if(UIInterfaceOrientationIsPortrait(self.interfaceOrientation)){ [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; }else{ [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait]; } ]]></description>
			<content:encoded><![CDATA[<p>This method link a toggle function to change between lanscape to protrait</p>
<pre>
 if(UIInterfaceOrientationIsPortrait(self.interfaceOrientation)){
        [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];
    }else{
        [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait];
    }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/force-change-ui-orientation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reflexion in Objective-C</title>
		<link>http://www.jiramot.info/reflexion-in-objective-c</link>
		<comments>http://www.jiramot.info/reflexion-in-objective-c#comments</comments>
		<pubDate>Wed, 21 Sep 2011 15:31:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=1087</guid>
		<description><![CDATA[<p>The simple way to create the new object with class name</p> id *object = [[NSClassFromString(@"MyClassName") alloc] init]; <p>see also</p> NSGetSizeAndAlignment NSClassFromString NSStringFromClass NSSelectorFromString NSStringFromSelector NSStringFromProtocol NSProtocolFromString ]]></description>
			<content:encoded><![CDATA[<p>The simple way to create the new object with class name</p>
<pre>id *object = [[NSClassFromString(@"MyClassName") alloc] init];</pre>
<p>see also</p>
<ul>
<li><code><a target="_blank" rel="nofollow" href="http://www.jiramot.info/goto/http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSGetSizeAndAlignment" >NSGetSizeAndAlignment</a></code></li>
<li><code><a target="_blank" rel="nofollow" href="http://www.jiramot.info/goto/http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSClassFromString" >NSClassFromString</a></code></li>
<li><code><a target="_blank" rel="nofollow" href="http://www.jiramot.info/goto/http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSStringFromClass" >NSStringFromClass</a></code></li>
<li><code><a target="_blank" rel="nofollow" href="http://www.jiramot.info/goto/http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSSelectorFromString" >NSSelectorFromString</a></code></li>
<li><code><a target="_blank" rel="nofollow" href="http://www.jiramot.info/goto/http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSStringFromSelector" >NSStringFromSelector</a></code></li>
<li><code><a target="_blank" rel="nofollow" href="http://www.jiramot.info/goto/http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSStringFromProtocol" >NSStringFromProtocol</a></code></li>
<li><code><a target="_blank" rel="nofollow" href="http://www.jiramot.info/goto/http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSProtocolFromString" >NSProtocolFromString</a></code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/reflexion-in-objective-c/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add extra font to iOS</title>
		<link>http://www.jiramot.info/how-to-add-extra-font-to-ios</link>
		<comments>http://www.jiramot.info/how-to-add-extra-font-to-ios#comments</comments>
		<pubDate>Wed, 21 Sep 2011 15:26:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=1085</guid>
		<description><![CDATA[<p>1. import font into xcode project 2. add UIAppFonts properties into info.plist with your file name of your font eg &#8216;filename.tlf&#8217; 3. Use the font name like iOS font system</p> <p>UIFont *font = [UIFont fontWithName: @"Font Name" size: 60]; _textLabel.font = font;</p> ]]></description>
			<content:encoded><![CDATA[<p>1. import font into xcode project<br />
2. add UIAppFonts properties into info.plist with your <strong>file name of your font</strong> eg &#8216;filename.tlf&#8217;<br />
3. Use the <strong>font name</strong> like iOS font system</p>
<p>UIFont *font = [UIFont fontWithName: @"Font Name" size: 60];<br />
    _textLabel.font = font;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/how-to-add-extra-font-to-ios/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding background image to UINavigationBar</title>
		<link>http://www.jiramot.info/adding-background-image-to-uinavigationbar</link>
		<comments>http://www.jiramot.info/adding-background-image-to-uinavigationbar#comments</comments>
		<pubDate>Wed, 21 Sep 2011 15:23:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=1083</guid>
		<description><![CDATA[<p>Create the class that override UINavigationBar and override drawRect function like this.</p> @implementation UINavigationBar (UINavigationBarCategory) - (void)drawRect:(CGRect)rect { UIColor *color = [UIColor orangeColor]; UIImage *img = [UIImage imageNamed: @"nav_bar.png"]; [img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; self.tintColor = color; [super drawRect: rect]; } @end <p>Also, for the next we want to change text in the title [...]]]></description>
			<content:encoded><![CDATA[<p>Create the class that override UINavigationBar and override drawRect function like this.</p>
<pre>
@implementation UINavigationBar (UINavigationBarCategory)
- (void)drawRect:(CGRect)rect {
    UIColor *color = [UIColor orangeColor];
    UIImage *img  = [UIImage imageNamed: @"nav_bar.png"];
    [img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
    self.tintColor = color;
    [super drawRect: rect];
}

@end
</pre>
<p>Also, for the next we want to change text in the title<br />
<span id="more-1083"></span></p>
<pre>
    CGRect frame = CGRectMake(0, 0, 200, 44);
    UILabel *label = [[[UILabel alloc] initWithFrame:frame] autorelease];

    label.backgroundColor = [UIColor clearColor];
    label.font = [UIFont systemFontOfSize:18];

    label.textAlignment = UITextAlignmentCenter;
    label.textColor = [UIColor blackColor];
    self.navigationItem.titleView = label;
    label.text = @"First View";
</pre>
<p>Enjoy. <img src='http://www.jiramot.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/adding-background-image-to-uinavigationbar/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective-C: Memory Management Rule</title>
		<link>http://www.jiramot.info/objective-c-memory-management-rule</link>
		<comments>http://www.jiramot.info/objective-c-memory-management-rule#comments</comments>
		<pubDate>Fri, 16 Sep 2011 07:44:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=1075</guid>
		<description><![CDATA[<p>Memory-Management Rules หรือบางครั้งเรียกว่า Ownership policy -การเป็นเจ้าของออบเจ็กทำได้โดยการ allocating memory หรือ copying เกี่ยวข้องกับเมธอด alloc, allocWithZone:, copy, copyWithZone:, mutableCopy, mutableCopyWithZone: -หากว่าเราไม่ได้เป็นคนสร้างออบเจ็ก แต่ต้องการทำให้แน่ใจว่ามันจะไม่ถูกทำลายลงไปก่อนสามารถใช้express an ownership ได้ เกี่ยวข้องกับเมธอด retain -ไม่ว่าคุฯจะสร้างออบเจ็ตเอง หรือว่าใช้วิธี expressing and ownership เมื่อไม่ได้ใช้แล้วสามารถ release ได้ เกี่ยวข้องกับเมธอด release, autorelease *แต่ถ้าคุณไม่ได้เป้นคนสร้างออบเจ็ก และก็ยังไม่ได้ใช้วิธีการ expressing and ownership โปรดอย่าไป release มัน! *โดยปกติ เมื่อเราได้รับออบเจ็กไม่ว่าจากไหนก็ตาม มันจะยังคงมีอยู่ภายใน scope ของ ฟังก์ชั่น แต่ถ้าต้องการใช้งานมันนอก scope ให้ใช้ retain หรือ [...]]]></description>
			<content:encoded><![CDATA[<p>Memory-Management Rules หรือบางครั้งเรียกว่า Ownership policy<br />
-การเป็นเจ้าของออบเจ็กทำได้โดยการ allocating memory หรือ copying<br />
เกี่ยวข้องกับเมธอด alloc, allocWithZone:, copy, copyWithZone:, mutableCopy, mutableCopyWithZone:<br />
-หากว่าเราไม่ได้เป็นคนสร้างออบเจ็ก แต่ต้องการทำให้แน่ใจว่ามันจะไม่ถูกทำลายลงไปก่อนสามารถใช้express an ownership ได้<br />
เกี่ยวข้องกับเมธอด retain<br />
-ไม่ว่าคุฯจะสร้างออบเจ็ตเอง หรือว่าใช้วิธี expressing and ownership เมื่อไม่ได้ใช้แล้วสามารถ release ได้<br />
เกี่ยวข้องกับเมธอด release, autorelease<br />
*แต่ถ้าคุณไม่ได้เป้นคนสร้างออบเจ็ก และก็ยังไม่ได้ใช้วิธีการ expressing and ownership โปรดอย่าไป release มัน!<br />
*โดยปกติ เมื่อเราได้รับออบเจ็กไม่ว่าจากไหนก็ตาม มันจะยังคงมีอยู่ภายใน scope ของ ฟังก์ชั่น แต่ถ้าต้องการใช้งานมันนอก scope ให้ใช้ retain หรือ copy<br />
แต่ถ้าพยายามจะ release ออบเจ็กที่มันโดน deallocated แล้ว โปรแกรมจะ เจ้ง (Crashes)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/objective-c-memory-management-rule/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gartner และ IDC บอกว่า Window Phone จะขึ้นเป็นอันดับ 2 ในปี 2015 ในตลาด Smart Phone!!</title>
		<link>http://www.jiramot.info/gartner-%e0%b9%81%e0%b8%a5%e0%b8%b0-idc-%e0%b8%9a%e0%b8%ad%e0%b8%81%e0%b8%a7%e0%b9%88%e0%b8%b2-window-phone-%e0%b8%88%e0%b8%b0%e0%b8%82%e0%b8%b6%e0%b9%89%e0%b8%99%e0%b9%80%e0%b8%9b%e0%b9%87%e0%b8%99</link>
		<comments>http://www.jiramot.info/gartner-%e0%b9%81%e0%b8%a5%e0%b8%b0-idc-%e0%b8%9a%e0%b8%ad%e0%b8%81%e0%b8%a7%e0%b9%88%e0%b8%b2-window-phone-%e0%b8%88%e0%b8%b0%e0%b8%82%e0%b8%b6%e0%b9%89%e0%b8%99%e0%b9%80%e0%b8%9b%e0%b9%87%e0%b8%99#comments</comments>
		<pubDate>Sun, 04 Sep 2011 20:16:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[window phone]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=1070</guid>
		<description><![CDATA[<p></p> <p>โดยส่วนแบ่งการตลาดของ Android จะปาเข้าไป 49%, Window Phone จะได้ 19.5% และ iPhone จะได้เพียง 17% แต่&#8230; แต่ปีนี้มันยังแค่ปี 2011 อยู่เลยนี่นา อีก เกือบ 4 ปีเลยน่ะนั้นหน่ะ ถึงวันนั้น อาจจะมี xOS, yOS ออกมาแล้วก็ได้</p> <p>หรือไม่ก็ Android อาจจะตายไปเพราะว่าไม่มีใครกล้าผลิต เพราะติดลิขสิทธิ์ไปซะหมด ก็ต้องรอดูต่อไป แต่ ณ วันนี้ ไม่ว่าใครจะยอดขายเท่าไหร่ แต่ทุกคนก็ต่างเผ้ารอการเปิดตัว iPhone 5 มากกว่า Smart Phone ตัวอื่นๆ </p> <p>ที่มา [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jiramot.info/wp-content/uploads/2011/09/window_phone.png" ><img src="http://www.jiramot.info/wp-content/uploads/2011/09/window_phone.png" alt="" title="window phone" width="520" height="329" class="aligncenter size-full wp-image-1071" /></a></p>
<p>โดยส่วนแบ่งการตลาดของ Android จะปาเข้าไป 49%, Window Phone จะได้ 19.5% และ iPhone จะได้เพียง 17%<br />
แต่&#8230;<br />
<span id="more-1070"></span><br />
แต่ปีนี้มันยังแค่ปี 2011 อยู่เลยนี่นา อีก เกือบ 4 ปีเลยน่ะนั้นหน่ะ ถึงวันนั้น อาจจะมี xOS, yOS ออกมาแล้วก็ได้</p>
<p>หรือไม่ก็ Android อาจจะตายไปเพราะว่าไม่มีใครกล้าผลิต เพราะติดลิขสิทธิ์ไปซะหมด ก็ต้องรอดูต่อไป แต่ ณ วันนี้ ไม่ว่าใครจะยอดขายเท่าไหร่ แต่ทุกคนก็ต่างเผ้ารอการเปิดตัว iPhone 5 มากกว่า Smart Phone ตัวอื่นๆ <img src='http://www.jiramot.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>ที่มา <a target="_blank" rel="nofollow" href="http://www.jiramot.info/goto/http://www.bgr.com/2011/09/02/microsoft-windows-phone-will-be-no-2-smartphone-os-by-2015/" >BGR</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/gartner-%e0%b9%81%e0%b8%a5%e0%b8%b0-idc-%e0%b8%9a%e0%b8%ad%e0%b8%81%e0%b8%a7%e0%b9%88%e0%b8%b2-window-phone-%e0%b8%88%e0%b8%b0%e0%b8%82%e0%b8%b6%e0%b9%89%e0%b8%99%e0%b9%80%e0%b8%9b%e0%b9%87%e0%b8%99/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone5 ขายตุลานี้?</title>
		<link>http://www.jiramot.info/iphone5-%e0%b8%82%e0%b8%b2%e0%b8%a2%e0%b8%95%e0%b8%b8%e0%b8%a5%e0%b8%b2%e0%b8%99%e0%b8%b5%e0%b9%89</link>
		<comments>http://www.jiramot.info/iphone5-%e0%b8%82%e0%b8%b2%e0%b8%a2%e0%b8%95%e0%b8%b8%e0%b8%a5%e0%b8%b2%e0%b8%99%e0%b8%b5%e0%b9%89#comments</comments>
		<pubDate>Sun, 04 Sep 2011 16:54:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=1061</guid>
		<description><![CDATA[<p></p> <p>แหล่งข่าว ของ BGR รายงานว่า Best Buy ร้านขายปลีกชื่อดังในสรัฐอเมริกา จะทำการ Presale iPhone 5 ของเครือข่าย Sprint ในสัปดาห์แรกของเดือนตุลาคมนี้ จากนี้ไปก็คงได้แต่นับวันรอเวลาขายจริงในไทยแล้วครับ โดยส่วนตัว เชื่อว่า ปลาย พฤจิกายนนี้คนไทยคงได้แห่กันไปเข้าคิวซื้อแน่นอนครับ และแน่นอน iPhone4 รุ่น 8GB จะมาทำให้เราคามือสอง iPhone 4 ตกเป็นเทน้ำเทน่าแน่ๆ </p> <p>จากข่าวทั้งหมด หน้าตาของ iPhone5 คงจอใหญ่ขึ้น บางขึ้น และมาพร้อมกับชิพประมวลผล A5 เหมือน iPad2 </p> <p>ปล เตรียมร่างกายให้พร้อม เพราะ งานนี้คงต้องไปนอนรอก่อน 3 วันงานขายจริงเป็นแน่แท้</p> [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jiramot.info/wp-content/uploads/2011/09/best-buy-mobile-iphone-5-sprint110904140827-645x481.jpeg" ><img src="http://www.jiramot.info/wp-content/uploads/2011/09/best-buy-mobile-iphone-5-sprint110904140827-645x481.jpeg" alt="" title="iPhone5 Best Buy" width="645" height="481" class="aligncenter size-full wp-image-1062" /></a></p>
<p>แหล่งข่าว ของ BGR รายงานว่า Best Buy ร้านขายปลีกชื่อดังในสรัฐอเมริกา จะทำการ Presale iPhone 5 ของเครือข่าย Sprint ในสัปดาห์แรกของเดือนตุลาคมนี้<br />
<span id="more-1061"></span><br />
จากนี้ไปก็คงได้แต่นับวันรอเวลาขายจริงในไทยแล้วครับ โดยส่วนตัว เชื่อว่า ปลาย พฤจิกายนนี้คนไทยคงได้แห่กันไปเข้าคิวซื้อแน่นอนครับ<br />
และแน่นอน iPhone4 รุ่น 8GB จะมาทำให้เราคามือสอง iPhone 4 ตกเป็นเทน้ำเทน่าแน่ๆ </p>
<p>จากข่าวทั้งหมด หน้าตาของ iPhone5 คงจอใหญ่ขึ้น บางขึ้น และมาพร้อมกับชิพประมวลผล A5 เหมือน iPad2 </p>
<p>ปล เตรียมร่างกายให้พร้อม เพราะ งานนี้คงต้องไปนอนรอก่อน 3 วันงานขายจริงเป็นแน่แท้</p>
<p><a href="http://www.jiramot.info/wp-content/uploads/2011/09/event-dtac-3g-expo-articles-06.jpg" ><img src="http://www.jiramot.info/wp-content/uploads/2011/09/event-dtac-3g-expo-articles-06.jpg" alt="" title="dtac 3g expo" width="500" height="375" class="aligncenter size-full wp-image-1063" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/iphone5-%e0%b8%82%e0%b8%b2%e0%b8%a2%e0%b8%95%e0%b8%b8%e0%b8%a5%e0%b8%b2%e0%b8%99%e0%b8%b5%e0%b9%89/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP APNS: Apple Push Notification Service</title>
		<link>http://www.jiramot.info/php-apns-apple-push-notification-service</link>
		<comments>http://www.jiramot.info/php-apns-apple-push-notification-service#comments</comments>
		<pubDate>Sat, 03 Sep 2011 18:53:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=1048</guid>
		<description><![CDATA[&#60;?php $deviceToken = 'token'; // masked for security reason print "token $deviceToken "; // Passphrase for the private key (ck.pem file) // $pass = 'password'; // Get the parameters from http get or from command line $message = $_GET['message'] or $message = $argv[1] or $message = 'Message received from javacom'; $badge = (int)$_GET['badge'] or [...]]]></description>
			<content:encoded><![CDATA[<pre>&lt;?php
$deviceToken = 'token'; // masked for security reason

print "token $deviceToken ";
// Passphrase for the private key (ck.pem file)
// $pass = 'password';
// Get the parameters from http get or from command line
$message = $_GET['message'] or $message = $argv[1] or $message = 'Message received from javacom';
$badge = (int)$_GET['badge'] or $badge = (int)$argv[2];
$sound = $_GET['sound'] or $sound = $argv[3];
// Construct the notification payload
$body = array();
$body['aps'] = array('alert' =&gt; $message);
if ($badge)
$body['aps']['badge'] = $badge;
if ($sound)
$body['aps']['sound'] = $sound;
/* End of Configurable Items */
$ctx = stream_context_create();
stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem');
// assume the private key passphase was removed.
// stream_context_set_option($ctx, 'ssl', 'passphrase', $pass);
$fp = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);
if (!$fp) {
	print "Failed to connect $err $errstrn";
	return;
} else {
	print "Connection OKn";
}
$payload = json_encode($body);
$msg = chr(0) . pack("n",32) . pack('H*', str_replace(' ', '', $deviceToken)) . pack("n",strlen($payload)) . $payload;

print "sending message :" . $payload . "n";
fwrite($fp, $msg);
fclose($fp);
?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/php-apns-apple-push-notification-service/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing text on Cancel Button in UISearchBar</title>
		<link>http://www.jiramot.info/changing-text-on-cancel-button-in-uisearchbar</link>
		<comments>http://www.jiramot.info/changing-text-on-cancel-button-in-uisearchbar#comments</comments>
		<pubDate>Sat, 03 Sep 2011 17:29:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://www.jiramot.info/?p=1043</guid>
		<description><![CDATA[<p> First: show cancel button in UISearchBar</p> [searchBar setShowsCancelButton:YES animated:YES]; <p>Then:</p> for(UIView *subView in searchBar.subviews){ if([subView isKindOfClass:UIButton.class]){ [(UIButton*)subView setTitle:@"Done" forState:UIControlStateNormal]; } } ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jiramot.info/wp-content/uploads/2011/09/uisearchbar02.jpg" ><img src="http://www.jiramot.info/wp-content/uploads/2011/09/uisearchbar02.jpg" alt="" title="UISearchBar" width="320" height="480" class="aligncenter size-full wp-image-1056" /></a><br />
<span id="more-1043"></span><br />
First: show cancel button in  UISearchBar</p>
<pre>
[searchBar setShowsCancelButton:YES animated:YES];
</pre>
<p>Then:</p>
<pre>
    for(UIView *subView in searchBar.subviews){
        if([subView isKindOfClass:UIButton.class]){
            [(UIButton*)subView setTitle:@"Done" forState:UIControlStateNormal];
        }
    }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jiramot.info/changing-text-on-cancel-button-in-uisearchbar/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

