Time of Update: 2018-12-05
1 點擊背景時關閉鍵盤在viewDidLoad中添加手勢辨識器// add tap gesture recognizer UITapGestureRecognizer* tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self
Time of Update: 2018-12-05
方法一:http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html 方法二:http://forrst.com/posts/UIDevice_Category_For_Processes-h1H 方法三:http://stackoverflow.com/questions/3878197/is-it-possible-to-
Time of Update: 2018-12-05
UIAlertView 類似於Windows上 的MessageBox.一點小記錄,哎!現在是部落格控了,什麼都想記下,雖然簡單並且蘋果的相關技術文檔也有說明,還是寫下來。強迫症的初期表現出來啦。。。。貼代碼:一般的使用UIAlertView *alert =[[UIAlertView alloc] initWithTitle:@"hello" message:@"I'm Apple"
Time of Update: 2018-12-05
從Git庫下載https://github.com/tonymillion/Reachability把兩個檔案Reachability.h 和 Reachability.m檔案添加到工程中。添加架構支援SystemConfiguration.framework添加標頭檔聲明:@class Reachability;@interface AppDelegate : UIResponder <UIApplicationDelegate>{
Time of Update: 2018-12-05
當你使用new alloc
Time of Update: 2018-12-05
新浪微博開放平台為第三方應用提供了簡便的合作模式,滿足了手機使用者和平板電腦使用者隨時隨地分享資訊的需求。通過調用平台的api即可實現很多微博上的功能。本篇主要目的是記錄新浪微博移動SDK iOS版本的在iOS5下的嵌入和使用。1、申請一個新浪微博的行動裝置 App 。申請地址:http://open.weibo.com/development,申請後得到App key 和 App Secret2、下載iOS_sdk:http://open.weibo.com/wiki/SDK#iOS_SDK
Time of Update: 2018-12-05
動畫效果提供了狀態或頁面轉換時流暢的使用者體驗,在iOS系統中,咱們不需要自己編寫繪製動畫的代碼,Core Animation提供了豐富的api來實現你需要的動畫效果。 UIKit只用UIView來展示動畫,動畫支援UIView下面的這些屬性改變:frame bounds center transform alpha backgroundColor contentStretch1、commitAnimations方式使用UIView動畫-
Time of Update: 2018-12-05
1、介紹
Time of Update: 2018-12-05
xmpp檔案傳輸主要有兩種方法:1 socks5 bytestreams 對應的協議是XEP-00652 In-Band Bytestreams(ibb) 對應的協議是XEP-0047socks5 Bytestreams方法的優點是效率高,但是跨網段傳輸時需要一個檔案代理。像openfire伺服器就內建有檔案代理,所以這個容易實現。同網段傳輸可以直接連接,一般的實現是發起端建一個socks5服務。實際使用該方法時還需要使用XEP-0095協議來初始化流。XMPPFramework未包含XEP-0
Time of Update: 2018-12-05
- (NSString *)getUniqueStrByUUID{ CFUUIDRef uuidObj = CFUUIDCreate(nil);//create a new UUID //get the string representation of the UUID NSString *uuidString = (__bridge_transfer NSString *)CFUUIDCreateString(nil, uuidObj);
Time of Update: 2018-12-05
編譯模擬器版本1 到https://github.com/yuvi/gas-preprocessor下載gas-preprocessor.p並拷貝到/usr/sbin目錄中2 下載ffmpeg源碼。http://ffmpeg.org/download.htmlhttps://github.com/FFmpeg/FFmpeg3 解壓源碼,cd到源碼目錄下4 建立檔案config_i386.sh,其內容如下#!/bin/tcsh -fset targetDir="../ffmpeg-libs/i38
Time of Update: 2018-12-05
添加好友代碼初始化xmppStream _xmppStream = [[XMPPStreamalloc] init]; //[_xmppStream setEnableBackgroundingOnSocket: YES]; [_xmppStreamaddDelegate:selfdelegateQueue:dispatch_get_main_queue()]; // _xmppRosterDataStorage =
Time of Update: 2018-12-05
Google Maps SDK 使用介紹 https://developers.google.com/maps/documentation/ios/start按照資料介紹,step by step,so you can!!第一步,下載Google Maps SDK for iOS https://developers.google.com/maps/documentation/ios/start#getting_the_google_maps_sdk_for_ios第二步 擷取Google
Time of Update: 2018-12-05
float systemVersion = [[[UIDevice currentDevice] systemVersion] floatValue];//iOS SystemVersion[[UIDevice currentDevice] name]); // Name of the phone as named by user [[UIDevice currentDevice] uniqueIdentifier]); // iOS5.0 及其以後這個方法已經被禁止使用。再繼續使用的後果是“
Time of Update: 2018-12-05
#include <objc/runtime.h> + (NSArray *)findAllOf:(Class)defaultClass{ int count = objc_getClassList(NULL, 0); if (count <= 0) { @throw@"Couldn't retrieve Obj-C class-list"; return [NSArray arrayWithObject:defaultClass]; }
Time of Update: 2018-12-05
ios全域變數使用1、使用靜態變數2、使用單例類3、把全域變數設定到AppDelegate中去例: 定義和使用一個全域變數"isLogin"AppDelegate.h@interface AppDelegate :UIResponder <UIApplicationDelegate>@property (strong,nonatomic)UIWindow *window;@propertyBOOL isLogin;@endAppDelegate.m@implementation
Time of Update: 2018-12-05
本文記錄一個自開始開發以來,基本和.NET與SQL打交道的傢伙開始學習iOS的經過。由於是學習中,不可避免的肯定會有很多疏漏。由於現在工作的主要項目不是iOS開發,更新可能會比較慢,每次可能也只更新一點點。大概可以成為反面教材吧。1. 版本控制Mac下,git有github的官方的工具,用起來還行。不過svn就比較悲慘了。XCode內建的更新到1.6.18後就停止了,導致我只要一開啟公司的svn項目就被提示svn版本不夠高。(也有一說是OSX 10.8根本不內建svn,見http://blog.
Time of Update: 2018-12-05
更新UI的操作在IOS中其實和在Android中是一致的,都是不能在主線程中執行比較耗時的操作,所以需要開啟新線程去做這些操作,以免阻塞主線程,當新線程中的操作完成之後,調用主線程來更新UI。下面就是一個這樣的例子:1、聲明ImageView控制項1 #import <UIKit/UIKit.h>2 3 @interface DemoDispatchQueueViewController : UIViewController4 @property(nonatomic,strong)
Time of Update: 2018-12-05
前段時間開發了一個簡單的 Web 應用程式,主要用來自動編譯 iOS 應用,簡化 iOS 應用的發布難度。由於編譯任務的密集計算部分主要由編譯器承擔,我們所需要做的只是一個商務邏輯的粘合,因此選用開發語言與架構的首要考慮點為:開發效率高。基於上面的基本原則選用的開發庫與架構如下:Mac 內建的 Python 2.6.1,64 位元模式Mac 下 pysvn 1.7.5,64 位元模式Mac 下 MySQL-Python 1.2.3,64 位元模式Mac 下 libxml2-python 2.6.
Time of Update: 2018-12-05
下面這個 C 函數可以用來檢測你的程式是否正在被調試: static bool debuggerRunning(void){ int junk; int mib[4]; struct kinfo_proc info; size_t size; info.kp_proc.p_flag = 0; mib[0] = CTL_KERN; mib[1] = KERN_PROC; mib[2]