原创 iphone中處理Gif文件

直接用UIWebView播放gif圖片UIWebView  *webView;NSString  *html= [NSString stringWithFormat:@"<img src = 'Test.gif /*此處填寫你要播放的GI

原创 網絡代碼

幾個網絡代碼 隱藏了真實的服務器IP 1、採用CFHTTPMessage等複製代碼          CFURLRef myWebserverURLRef = CFURLCreateWithString(kCFAllocatorDef

原创 NSStream來實現Socket

使用NSStream來實現Socket(寫的不好的地方,請多批評~) 這玩意兒已經摺騰我小半年了,因爲沒有socket開發方面的經驗,跌跌撞撞遇到了不少麻煩。以下是目前應用在我程序中的Stream類,真機真網絡使用正常,3G和wifi都

原创 iphone post data

 #define d_LocalNetAddress http://XXX.XXX.XXX.XXX/a.action         NSString * content = @"Test";          NSInputStrea

原创 在iphone上NSTimer的使用!

NSTimer  *mTimer = [NSTimer scheduledTimerWithTimeInterval:0.1   target:self selector: @selector(moveUp:) userInfo:

原创 iPhone中對UIImage對象處理的常用方法

(一)根據給定得圖片,從其指定區域截取一張新得圖片   -(UIImage *)getImageFromImage{ //大圖bigImage //定義myImageRect,截圖的區域 CGRect myImageRec

原创 簡單實現異步下載

異步:(需要實現delegate) NSURLConnection 類: + (NSURLConnection *)connectionWithRequest:(NSURLRequest *)request delegate:(id)de

原创 UIImage得一個Category, Resizes(調整尺寸)

寫在最前邊: Category得用法很方便, 舉例來說: 新建一個Class文件, 文件名隨意需要建立UIImage得Category就按照如下格式添加函數,括號內名稱隨意, 這種格式, 編譯器即認爲是一個Category @inter

原创 高階快捷鍵組合

alt+cmd   +上alt+cmd   +左/右 (sdk3.0之後有不同)alt+左/右control+左/右cmd+左/右alt+shift+左/右control+shift+左/右cmd+shift+左/右control+shi

原创 App Icons on iPad and iPhone

App Icons on iPad and iPhone Q: How are the icon files in my application bundle used on iPad and iPhone? A: Below

原创 怎樣在程序裏把png的圖片處理成圓角顯示。

- (UIImage *) roundCorners: (UIImage*) img{    int w = img.size.width;    int h = img.size.height;        CGColorSpaceR

原创 IPhone短信相關部分研究

http://garfieldfox.spaces.live.com/?_c11_BlogPart_BlogPart=blogview&_c=BlogPart&partqs=cat%3DIPhone 短信發送和截獲 方式一: 打開/de

原创 App Icons on iPad and iPhone

App Icons on iPad and iPhone Q: How are the icon files in my application bundle used on iPad and iPhone? A: Below

原创 UIImagePickerController

  http://blog.airsource.co.uk/index.php/2008/11/11/views-of-uiimagepickercontroller/   Well the new 3.1 OS certainly ma

原创 How To Read a File From Your Application Bundle

  First you need to add your file to the Resources folder of your Xcode project. Then you can access the file like th