Time of Update: 2018-12-06
- (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delayParametersaSelectorA selector that identifies the method to invoke. The method should not have a significant return value and should take a single
Time of Update: 2018-12-06
轉自:http://b.imi.im/?p=255如何編譯靜態類庫,大家已經比較熟悉了,而且現在網上也有很多教程,就不多羅唆了. 現在問題是, 我們編譯好了會是兩個版本的.a檔案 分別用於模擬器和iPhone真機, 因為Mac和iPhone的CPU不同, 才造成了這樣的情況. 有點像 PowerMac 和 InterMac.在使用靜態類庫的時候, 我們如果想在模擬器調試, 就必須把用於模擬器版本的lib加到項目裡, 同理要想運行在iPhone上, 我們又必須把真機lib也加到項目,
Time of Update: 2018-12-06
轉自:http://www.flyblog.info/今天看到cocoachina有人問起這個問題, 正好把好久以前的一段代碼發了上來, 這段代碼已經經過驗證,精度還是可以保障的, 對於不同的應用需要更換調整地球半徑值 ,先看代碼#define PI 3.1415926 double LantitudeLongitudeDist(double lon1,double lat1, double lon2,double lat2){double er = 6378137; // 6378700.0
Time of Update: 2018-12-06
轉自:http://blog.csdn.net/dahan_wangtao/archive/2010/03/10/5365014.aspx最近要對IPTV的架構進行重新整合,中間有一段需要對PCM進行封裝成WAV檔案,看了一下WAV的封裝說明,把要點記錄下來,希望對其他人有協助:WAV格式主要有以下架構unsigned char ucWAVHeader[] ={ // RIFF WAVE Chunk 0x52, 0x49, 0x46, 0x46, // "RIFF" 0x30, 0x00, 0
Time of Update: 2018-12-06
代碼Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
Time of Update: 2018-12-06
typedef enum { UITableViewCellAccessoryNone, // don't show any accessory view UITableViewCellAccessoryDisclosureIndicator, // regular chevron. doesn't track UITableViewCellAccessoryDetailDisclosureButton, // blue button
Time of Update: 2018-12-06
typedef enum { UIBarButtonSystemItemDone, UIBarButtonSystemItemCancel, UIBarButtonSystemItemEdit, UIBarButtonSystemItemSave, UIBarButtonSystemItemAdd, UIBarButtonSystemItemFlexibleSpace, UIBarButtonSystemItemFixedSpace,
Time of Update: 2018-12-06
NSLog([[UIDevice currentDevice] name]); // Name of the phone as named by userNSLog([[UIDevice currentDevice] uniqueIdentifier]); // A GUID like stringNSLog([[UIDevice currentDevice] systemName]); // "iPhone OS"NSLog([[UIDevice currentDevice]
Time of Update: 2018-12-06
-(void)loadImageFromAlbums{if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]){UIImagePickerController *picker = [[UIImagePickerController alloc] init];picker.delegate = self;picker.sourceType =
Time of Update: 2018-12-06
轉自:http://www.voland.com.cn/iphone-use-nslocalizedstring-internationalization一、擷取系統所支援的國際化資訊在國際化之前,你可以在iphone中的”設定->通用->多語言環境->語言”中來查看你的iphone支援哪些語言,當然也可以寫一段代碼測試一下你的iphone都支援哪些語言.測試代碼如下:NSUserDefaults *defaults = [NSUserDefaults
Time of Update: 2018-12-06
轉自:http://www.iphone-geek.cn/iPhone SDK中的AVFoundation架構套件括的AVAudioPlayer是一個容易使用而且功能強大,基於object-c的播放音頻檔案播放器。本教程展示了怎樣使用AVAudioPlayer。本教程將建立一個簡單的程式,它能夠迴圈播放一段mp3音頻檔案。原始碼/Guithub教程的原始碼在GitHub上。你可以從倉庫中複製或直接下載zip檔案。建立項目 Launch Xcode and create a new
Time of Update: 2018-12-06
轉自:http://www.cocoachina.com/cms/plus/view.php?aid=2373蘋果預設會在 App Store 裡的應用表徵圖上半部自動添加高亮特效(如),雖是好心但有時候這半個光圈會破壞表徵圖設計者的原作。如果您要去掉這一高亮特效,可以在程式的 info.plist 裡添加一個實值型別為 boolean 的欄位:UIPrerenderedIcon,然後選中。再上傳應用,App Store 就不會在表徵圖上添加高亮特效了。
Time of Update: 2018-12-06
轉自:http://www.iu3d.com/showthread.php/127-unity3d中固定幀速的設定unity3d程式也可以設定預設的運行幀頻,就像在flash中的幀頻功能一樣,只不過在unity3d中並不能百分百的讓程式按固定幀頻來運行,畢竟這牽涉到一個硬體效能的問題。下面看看用到是是哪一個類及相關屬性:Application.targetFrameRate static var targetFrameRate : int DescriptionInstructs game
Time of Update: 2018-12-06
轉自:http://www.flyblog.info/也許養成給規劃您的一天列清單排表格的習慣能使你的工作更有條理,然而同樣是為了提高效率,我相信能掌握一些保持專註的技巧也很重要。如果你有定力能夠安靜地坐在台前全神貫注投入工作長達幾個小時,我敢保證,在這樣的狀態下,即使是半個小時的工作,也一定比不斷分心常遭幹擾的一天的工作能取得更多的成果。一、杜絕幹擾很明顯,周遭的幹擾足以讓你在工作中心神不寧,那麼你排除了這些幹擾嗎?不得不承認,運行自動收 信軟體(譯者註:如Gmail
Time of Update: 2018-12-06
轉自:http://blog.csdn.net/cloudhsu/archive/2010/08/20/5825965.aspx這段代碼示範怎麼取得iphone的剩餘磁碟空間,還有全部磁碟空間-(float)getFreeDiskSpace { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); struct statfs
Time of Update: 2018-12-06
轉自:http://www.cocoachina.com/bbs/read.php?tid-3158.html寫在最前邊: Category得用法很方便, 舉例來說: 建立一個Class檔案, 檔案名稱隨意需要建立UIImage得Category就按照如下格式添加函數,括弧內名稱隨意, 這種格式, 編譯器即認為是一個Category@interface UIImage (xxx)@end@implementation UIImage (xxx)@end完整代碼如下, 用法見附件Sample
Time of Update: 2018-12-06
static NSString *feedURLString = @"http://weather.yahoo.com/"; NSURLRequest *yahooWeatherURLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:feedURLString]]; self.yahooWeatherFeedConnection = [[[NSURLConnection alloc]
Time of Update: 2018-12-06
轉自:http://www.ieliwb.com/nsnotification-observer-communicate/首頁在view1的控制器初始化init方法裡加上觀察者模式方法:[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadChat:) name:@”reloadChat”
Time of Update: 2018-12-06
轉自:http://www.voland.com.cn/iphone-international-application-nameiphone應用程式名稱的國際化在前面的文章,有一文章叫做《iPhone
Time of Update: 2018-12-06
轉自:http://www.cocoachina.com/b/?p=237plist檔案是標準的xml檔案,在cocoa中可以很簡單地使用。這裡介紹一下使用方法:以下代碼在Mac和iPhone中均適用。寫入plist檔案: NSMutableDictionary* dict = [ [ NSMutableDictionary alloc ] initWithContentsOfFile:@"/Sample.plist" ];[ dict setObject:@"Yes"