Time of Update: 2018-12-05
NSLog([[UIDevice currentDevice] name]); // 擷取裝置的名稱NSLog([[UIDevice currentDevice] uniqueIdentifier]); //擷取GUID 唯一識別碼NSLog([[UIDevice currentDevice] systemName]); //擷取系統名稱NSLog([[UIDevice currentDevice] systemVersion]); // 版本號碼eg.float version =
Time of Update: 2018-12-05
轉自http://www.cnblogs.com/wupher/archive/2012/04/28/2475132.html下拉重新整理將資料儲存至keyRing簡單的模板引擎,用來產生htmlOmniGroup這個其實不是類庫,是一個Cocoa的RecipeCocoaPods 為XCode project提供一個類似apt-get maven那樣的類庫管理工具, COOL, 教程見:http://www.cocoapods.org/OPEventTracker 對mainThread
Time of Update: 2018-12-05
//Create empty PDF context on iPhone for later randering in it-(CGContextRef) createPDFContext:(CGRect)inMediaBox path:(CFStringRef) path{ CGContextRef myOutContext = NULL; CFURLRef url; url = CFURLCreateWithFileSystemPath (NULL, //
Time of Update: 2018-12-05
- (void) hideTabBar:(BOOL) hidden{ [UIView beginAnimations:nilcontext:NULL]; [UIView setAnimationDuration:0]; UIView *window = [UIApplicationsharedApplication].keyWindow; for(UIView *viewin self.tabBarController.view.subviews) {
Time of Update: 2018-12-05
比如我們需要儲存資料到沙箱中,然後再去對該檔案進行判斷檢測。 NSArray *paths =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *docuDir = [paths objectAtIndex:0]; NSString *savedFileName = [docuDir
Time of Update: 2018-12-05
因為各種需求,需要擷取的路徑不一致,故寫下這文章,以作備忘。- (NSString *)getDocumentPath{ NSString *path = nil; // Method 1 NSArray *pathsArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); path = [pathsArray objectAtIndex:0];
Time of Update: 2018-12-05
這段時間在做iOS上二維碼和一維碼的識別其間遇到問題無數, 特此總結下來, 希望能給後來的同學供參考在iOS上, 做二維碼識別, 首先在網上尋找資料, 尋找到ZBar和ZXing這兩個開源的識別程式, 相比之下發現, iOS上ZBar能做一維碼(即條碼)和二維碼的識別, ZXing只能做二維碼的識別, 但ZXing在android上是可以即做一維碼又做二維碼的識別, 但在iOS上尚不支援一維碼的識識, 這是ZXing的官方說法,
Time of Update: 2018-12-05
atomic和nonatomic用來決定編譯器產生的getter和setter是否為原子操作。 atomic 設定成員變數的@property屬性時,預設為atomic,提供多安全執行緒。 在多線程環境下,原子操作是必要的,否則有可能引起錯誤的結果。加了atomic,setter函數會變成下面這樣: {lock}
Time of Update: 2018-12-05
1. 使用@property和@synthesize聲明一個成員變數,給其賦值是時要在前面加上"self.",以便調用成員變數的setmember方法。 直接調用成員變數並且給其賦值:member=[NSString stringWithFormat:@””];將不執行setmember 方法。 使用self調用成員變數並且給其賦值:self.member=[NSString stringWithFormat:@””];將執行setmember方法。2.延時函數:
Time of Update: 2018-12-05
概述:網路架構最低水平網路架構可以在iPhone SDK是的BSD
Time of Update: 2018-12-05
更新說明:後面發現這篇文章介紹的比較全面http://blog.csdn.net/ch_soft/article/details/6740000文章轉載於:http://www.ethangao.com/?p=273,謝謝作者分享。gdb不是萬能的,可是沒有gdb卻是萬萬不能的。這裡給大家簡單介紹下iOS開發中最基本的gdb命令。popo是print-object的簡寫,可用來列印所有NSObject對象。使用舉例如下:(gdb) po
Time of Update: 2018-12-05
獲得所支援的語言NSUserDefaults *defaults = [ NSUserDefaults standardUserDefaults ]; // 取得 iPhone 支援的所有語言設定 NSArray *languages = [defaults objectForKey : @"AppleLanguages" ]; NSLog ( @"%@" , languages);運行,列印結果:( en, "zh-Hant", "zh-Hans", fr,
Time of Update: 2018-12-05
protocol——協議協議是用來定義對象的屬性,行為和用於回調的。
Time of Update: 2018-12-05
轉載發布測試的最後一步打包(Archive),Xcode4協助文檔有比較詳細介紹,但是居然是錯的,這裡說明一下。1、設定“Build Settings”,是官方文檔,留意那個紅框,居然說反了。"Skip install"一定要選NO,否則在下面的打包步驟後,Organizer看不到你的程式,就為這折騰我好些時間,國外論壇一堆問題,說我按照官方文檔做了,怎麼Organizer看不到程式。 1.1 選擇ad hoc認證.在“Code
Time of Update: 2018-12-05
http://blog.csdn.net/csj1987/article/details/6657468IOS中的core
Time of Update: 2018-12-05
SDK現在可以直接開啟setting頁面了,以往的SDK則不可以,當時我還花了大量時間去實現,結果不了了之。如果你想開啟Location SiOS5的SDK現在可以直接開啟setting頁面了,以往的SDK則不可以,當時我還花了大量時間去實現,結果不了了之。如果你想開啟Location Services的setting頁面,代碼如下:[[UIApplication sharedApplication] openURL:[NSURL
Time of Update: 2018-12-05
掃描wifi資訊:http://code.google.com/p/uwecaugmentedrealityproject/http://code.google.com/p/iphone-wireless/條碼掃描:http://zbar.sourceforge.net/iphone/sdkdoc/install.htmltcp/ip的通訊協議:http://code.google.com/p/cocoaasyncsocket/voip/sip:http://code.google.com/p/
Time of Update: 2018-12-05
Xcode 4.2 弱化了XIB,採用storyboard了,網上和買的教程都是用XIB來講解的,我就用XIB寫了一個HelloWorld程式。1. 建工程選擇iOS下的Application,建立Empty Application工程(更改工程為4.3工程(要5.0以下),不然會啟動並執行時候會報錯)2. 建xib檔案在工程目錄上右擊,建立檔案,選擇User Interface的Empty,建立MainWindow.xib檔案3.
Time of Update: 2018-12-05
昨天用delphiXE2寫了兩個iOS應用,一個是3D的,可惜我的iphone是3G的,3D的那個需要GPU支援,沒有跑起來。但是那個HD的還是啟動並執行挺好的。我用XCode開發有一年多的時間,XCode也算是不錯的開發工具,尤其是在macOS上,無與倫比。但是開發的效率上,無法跟delphi比。我用delphi
Time of Update: 2018-12-05
在iphone4的開發中,可以用- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated[self presentModalViewController:<#(UIViewController *)modalViewController#> animated:<#(BOOL)animated#>]方法來切換由-